Judge.me Integration

Introduction

Zinrelo has seamlessly integrated with Judge.me, a customer review platform that specializes in providing review solutions for eCommerce stores. It allows businesses to collect and display product reviews to build trust, drive traffic, and increase sales.

With this integration, Zinrelo will be able to track all customer reviews submitted in the Judge.me platform and award points accordingly.

📘

Please Note: We reward points based on the user's email address when they submit reviews.

Before we start with Judge.me integration, make sure that you have installed the Judge.me app. This step is crucial to proceed with the integration process seamlessly. For installation steps, refer to this document.

Setting up OAuth

After completing the installation process, please proceed with generating the access token. Zinrelo will need an access token to create a webhook in Judge.me. This access token grants Zinrelo the ability to invoke relevant APIs within the allowed scope of the Judge.me platform.

📘

Note: The Judge.me webhooks feature is exclusively available to users with Judge.me Awesome plan.

Please follow the steps to generate the access token:

Create an App in Judge.me

To know how to create an app in Judge.me, click here.

In this new app, fill in the following details:

create an app

Once the app is created, it will be visible beside “Public View.”

app

Obtain Client ID and Secret Key

a. To obtain Client ID and Secret, click on the “My apps” button.

client id and secret key

b. Click on the Edit button.

app details

c. From here, you will get a Client ID and Secret.

Build the Authorization URL to get Code

Build the authorization URL by incorporating the following parameters: client_id, redirect_uri, scope, and state (optional).

method=GET <https://judge.me/oauth/authorize?client_id=e9aa17df97285cc93373ec809806c585814d71c3016252&redirect_uri=https://example_app.com/oauth_callback&response_type=code&scope=read_products%20write_products&state=806c55452280b84098fc>

Parameters in the authorization URL:

client_idEvery connected app is identified by a client_id. For details, refer to this section of the document.
redirect_uriwrite to your account manager at Zinrelo (or at [email protected] ) for the URI.
scopescope is the list of permissions that your app requests the store to approve. The default scopes are set to 'public.' The list of optional scopes are as follows:
- read_reviewers
- read_reviews
Please note that passing the scope is mandatory.
response_typeresponse_type will be set to code, indicating that the application expects to receive an authorization code if successful.
state (optional)You can send a random value as state when starting the authorization request and use it to validate the authorization code when receiving a response from Judge.me.

Upon hitting the URL on the browser, the screen as shown below will appear.

authorization screen

To obtain the code, click on the “Authorize” button. This action will redirect you to the page where you can retrieve the code.

You will get the code in the redirected url like: “[your_redirect_uri]?code=[code_number]”

An example of real code will look like this:
"<https://example.com/auth/judgeme/callback?code=32279746ee4db4312ca49ae627f043fbc3680f605c360317">

Exchange for a Permanent Access Token

After obtaining the authorization code, the subsequent step involves exchanging it for a permanent access token. This token enables API calls within defined scopes.

Required Details for Exchange:
To complete this exchange, the following details are necessary:

  • client_id (refer to this part of the document)
  • client_secret (refer to this part of the document)
  • code (refer to this part of the document)
  • redirect_uri (link to Zinrelo integration link shared with you)

cURL Request:

Use the provided cURL request below, passing all the necessary details:

curl --location --request POST 'https://judge.me/oauth/token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "client_id": "client_id",
    "client_secret": "client_secret",
    "code": "32279746ee4db4312ca49ae627f043fbc370e5a875f7afe2b1c",
    "redirect_uri": "http://example.com/auth/judgeme/callback",
    "state": "9f1c39b9a714771ccb331fb5742a574a26329d0",
    "grant_type": "authorization_code"
}'

Access Token Retrieval:

Upon executing the cURL request, you'll receive an access token:

📘

{ "access_token": "39452ed283252c8ea2083faa9b371cc77e82c22471da9b935e4ee37a", "token_type": "Bearer", "scope": "read_reviews", "created_at": 1646287086}

Integration Details Required:

For a complete integration, please share the following details:

  • Access Token
  • Client ID
  • Client Secret