1. OAuth2
TrustWILL
  • Reviews Widget Integration
  • Reviews Data API
    • Trustoo Open API — Quick Start
    • OAuth2
      • OAuth2 Merchant Authorization
        GET
      • Get OAuth2 Authorization URL
        GET
      • OAuth2 Get / Refresh Access Token
        POST
      • Revoke Token
        POST
    • Platform Management
      • Disconnect Platform Authorization
      • Get Shop Authorization Info
      • Get Shop Installation Status
      • Cancel Platform Authorization
    • Webhooks
      • Create Shop Webhook
      • Update Shop Webhook
      • Delete Shop Webhook
      • Get Shop Webhooks
    • Reviews
      • Get Review Detail
      • Get Review List
      • Create Review
      • Delete Review
      • Get Rating
    • Media Upload
      • Get Video Upload URL
      • Get Image Upload Credentials
    • Orders
      • Get Order List
    • Customer Events
      • Get Customer Event List
    • Customers
      • Email Unsubscribe
      • Create Customer Exclusion
      • Delete Customer Exclusion
      • Get Customer Exclusion List
  • Schemas
    • SuccessResponse
    • ErrorResponse
    • Pagination
    • OAuthTokenRequest
    • Webhook
    • CreateReviewRequest
    • Review
    • Rating
    • Order
    • CustomerEvent
    • CustomerExclusion
    • ImageUploadCredentials
  1. OAuth2

OAuth2 Get / Refresh Access Token

POST
/api/v1/openapi/oauth/token
Exchange an authorization_code or refresh_token for an access_token. Also supports client_credentials grant for special platforms (skip_shop_oauth=1) that can obtain tokens without merchant authorization.
Authentication: client_id + client_secret in request body

Request

Body Params application/jsonRequired

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 '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
Token issued successfully
Bodyapplication/json

Example
{
    "code": 0,
    "message": "string",
    "time": 0,
    "request_id": "string",
    "data": {
        "access_token": "string",
        "token_type": "Bearer",
        "expires_in": 3600,
        "refresh_token": "string",
        "scope": "string"
    }
}
Modified at 2026-06-24 04:25:21
Previous
Get OAuth2 Authorization URL
Next
Revoke Token
Built with