Skip to main content

Introduction

Trustpilot is an online review platform that enables customers to share feedback and allows you to manage and respond to reviews. This page provides a step-by-step guide for:
  • Creating review invitations using Trustpilot’s Create Invitation API
  • Personalizing messages with product reviews through Trustpilot’s Product Reviews API

Integration

PrerequisitesEnsure you have access to a Trustpilot account and a Trustpilot authentication key.
To integrate with TrustPilot, use the optilyz API to send recipient data to the MoEngage connectors.

Get your Trustpilot API credentials

  1. Log into Trustpilot with your credentials.
  2. Create or retrieve the API key and secret in the Trustpilot dashboard by going to Integrations > Developers > APIs. If you don’t already have an API key, create a new one:
    1. Go to Application Name > Create Application
    2. Copy your API key and secret, which will be used to authenticate your Content API requests

Sending Trustpilot review invitations

Step 1: Create an OAuth config on MoEngage

Use MoEngage content APIs to make a request to Trustpilot’s Authentication endpoint to retrieve the Access Token. On your MoEngage dashboard:
  1. Navigate to Settings >> Authorisation configuration
  2. Click Add new config
  3. Fill in the details:
    1. OAuth Name: TrustPilot
    2. Grant Type: Client Credentials
    3. Token type: Opaque Screenshot 2025-02-14 at 4.55.33 PM.png
    4. API URL: https://api.trustpilot.com/v1/oauth/oauth-business-users-for-applications/accesstoken
    5. Method: Post
    6. Headers:
      Content-Type: application/x-www-form-urlencoded
      Authorization: Basic {{'API_KEY:API_SECRET' | base64_encode}}
    7. Request Body: Select form and add the following Key value:
      grant_type: client_credentials
      Screenshot 2025-02-14 at 4.59.22 PM.png
  4. Click Send Test and Continue.
  5. Save your connection

Step 2: Create a connector campaign on MoEngage

To create a connector campaign on MoEngage:
  1. Navigate to Create Campaign >> Connectors >> Custom Screenshot_2022-02-21_at_10.48.46_PM.png
  2. On step 2 of the campaign, select:
    KeyValue
    MethodPOST
    Webhook URLhttps://invitations-api.trustpilot.com/v1/private/business-units/%7BbusinessUnitId%7D/email-invitations
    HeadersEnable OAuth toggle and select trustpilot. And Select Auth Prefix as Basic

    Screenshot 2025-02-14 at 5.07.12 PM.png
  3. Enter the request body as per the TrustPilot documentation.
  4. Test your configuration: At this point, your campaign should be ready to test and send. You can also test your connector configuration using the Test functionality available on Step 2 of Create Connector Campaign. Screen_Shot_2022-02-22_at_11.12.42_AM.png
  5. Now, publish your campaign.

Personalizing messages with product review insights

If you want to use product reviews from TrustPilot in your campaigns, you can use MoEngage Content API to make a call to Trustpilot’s Get product reviews summary endpoint.