1. Reviews Data API
Trustoo
  • Reviews Widget Integration
  • Reviews Data API
    • API Quick Start
    • Response Code
    • Webhook Description
    • Get OAuth2 Authorization URL
      GET
    • OAuth2 Get Access Token
      POST
    • Revoke Token
      POST
    • Disconnect Authorization
      POST
    • Get Shop Authorization Info
      GET
    • Get Shop Installation Status
      GET
    • Create shop webhook
      POST
    • Update shop webhook
      POST
    • Delete shop webhook
      POST
    • Get shop webhooks
      GET
    • Get review detail
      GET
    • Get review list
      GET
    • Get order list
      GET
    • Get rating
      GET
    • Get customer event list
      GET
    • Unsubscribe
      POST
    • Get the video upload url
      GET
    • Create review
      POST
    • Delete review
      POST
    • Create customer exclusion
      POST
    • Delete customer exclusion
      POST
    • Get customer exclusion list
      GET
  • Schemas
    • Sample Schemas
      • Pet
      • Category
      • Tag
  1. Reviews Data API

OAuth2 Get Access Token

POST
/api/v1/openapi/oauth/token
Exchange authorization_code or refresh_token for access_token

Request

Authorization
API Key
Add parameter in header
authorization
Example:
authorization: ********************
or
Body Params application/json

Example
{
    "grant_type": "authorization_code",
    "client_id": "trustwill",
    "client_secret": "oauth_test_secret_2026",
    "code": "6y/ly4b0PVJLCv6fafC2Xg==",
    "redirect_uri": "http://localhost:3000/oauth/callback"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://rapi.trustoo.io/api/v1/openapi/oauth/token' \
--header 'authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "grant_type": "authorization_code",
    "client_id": "trustwill",
    "client_secret": "oauth_test_secret_2026",
    "code": "6y/ly4b0PVJLCv6fafC2Xg==",
    "redirect_uri": "http://localhost:3000/oauth/callback"
}'

Responses

🟢200
application/json
Successful response
Bodyapplication/json

Example
{
    "code": 0,
    "message": "success",
    "time": 1780401009,
    "request_id": "f6cde0461ef81e496c076a06b8af6e63",
    "data": {
        "access_token": "JFjRBBzklGOonJ2PVBVIlg==",
        "token_type": "Bearer",
        "expires_in": "3600",
        "refresh_token": "/o6aGgGn4cDP+qxnwBBr4Q==",
        "scope": "read_orders,write_reviews"
    }
}
Modified at 2026-06-15 03:23:17
Previous
Get OAuth2 Authorization URL
Next
Revoke Token
Built with