Skip to content

About Authorization

Access scope

Multiple access scopes needed — refer to each endpoint for access scope requirements.

Authorization is the process of granting application permissions. When merchants install an application and consent to its requested permissions on the Genstore platform, the platform issues an access token with the corresponding permission scope. Applications use this token to interact with the Genstore platform.

Core Features

  • Permission Scope Query: Provide interfaces to query current application permission scopes.

Use Cases

  • Permission Scope Update: Applications can retrieve current permissions through the scope query interface. When new permissions are required, merchants will be guided to update their authorization.

Endpoints

EVENT app/authorizationCodeGranted: Authorization code granted

Access scope Object

Authorized application access scope.

Properties

accessScopesstring
A list of permissions that access tokens have
bash
{
  "accessScopes": "[read_orders,write_orders]"
}

EVENT Authorization code granted

When the app is pre-installed during store initialization, an authorization code is granted to the app.

Access scope

Requires ANY of the following access scopes: write_apps read_apps

Topic

EVENT app/authorizationCodeGranted 

Event Data

authCodeobject
Authorization code information.
- Hide child properties
clientIdstring
Application's client ID.
shopIdnumber
Unique identifier for the current shop.
codestring
The authorization code used to obtain the token.
json
{
  "authCode": {
    "clientId": "58DAED6AEC7AA1C2C8DFD719E8E06E3A",
    "code": "e4141dwadwae1312",
    "shopId": "4022054969604"
  }
}