Skip to content

Authentication

1.error response message:"Invalid signature, Keeta sig is XXXXX. Refer to the documentation link https://xxxx for signature calculation rules"

The signature calculation is abnormal. We recommend referring to the technical documentation to check your signature calculation method (paying particular attention to the parameter order, client_id, and client_secret, etc.). The documentation also provides a ready-to-run signature calculation method example (Java version). Finally, here is a signature calculation verification tool we provide that you can use to help verify your calculation method (https://toolset.mynocode.host/).

2.error response message:"This client_id has no authorized Merchant. Please contact Merchant authorize"

You must complete authorization at least one merchant before you can successfully exchange tokens for your application;

3.error response message:"The access token has expired, please reauthorize"

You used an expired token to call the endpoint. Please call the POST /oauth/token endpoint again to refresh the token.

4.error response message:"The access token is invalid, please use a valid access token"

You used an invalid token. Please check if the token and client_id you used match.

Get Access Token

Request

Requests new access token for accessing Keeta API resources.
If you have completed the development in full compliance with the Open Delivery native protocol's grant_type=client_credentials, please contact Keeta.
If you have already completed development using grant_type=client_credentials and have passed SIT certification or are already in production, you can continue to use grant_type=client_credentials without any impact.

IMPORTANT: The Software Service must obtain the merchant’s authorization before accessing their data.

APP Level Token mode
  1. Application-level access_token: The access_token can be used to access all stores authorized
  2. grant_type = app_level_token: Generate and refresh access_token
Shop Level Authorization Code mode
  1. Store-level access_token: The access_token can be used to access one store authorized
  2. grant_type = shop_level_authorization_code: Use authorization_code to generate access_token, and return refresh_token for subsequent refresh
  3. grant_type = refresh_token: Use this parameter to refresh a new access_token and refresh_token, before the old access_token expires.

HOST: Keeta

DIRECTION:

Bodyapplication/jsonrequired
client_idstringrequired

Client identifier provided by Keeta.

grant_typestringrequired

The OAuth grant type.

Value:"app_level_token"
Discriminator
client_secretstringrequired

Client Secret provided by Keeta.(When grant_type = app_level_token, this field needs to be filled in)

curl -i -X POST \
  https://open.mykeeta.com/api/open/opendelivery/oauth/token \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "string",
    "grant_type": "app_level_token",
    "client_secret": "string"
  }'

Responses

Successful returns token request.

Bodyapplication/json
access_tokenstringrequired

A code representing the access token.

token_typestringrequired

The token type. Currently, the only supported type is bearer.

Example:"bearer"
expires_ininteger

The token expiration time in seconds

refresh_tokenstringrequired

A code representing the refresh token.
Condition: This field will be returned when the grant_type is shop_level_authorization_code or refresh_token. When the grant_type is set to app_level_token, the response does not contain this field.

Response
{ "access_token": "string", "token_type": "bearer", "expires_in": 0, "refresh_token": "string" }

Get Access Token

Request

Requests new access token for accessing Keeta API resources.
If you have completed the development in full compliance with the Open Delivery native protocol's grant_type=client_credentials, please contact Keeta.
If you have already completed development using grant_type=client_credentials and have passed SIT certification or are already in production, you can continue to use grant_type=client_credentials without any impact.

IMPORTANT: The Software Service must obtain the merchant’s authorization before accessing their data.

APP Level Token mode
  1. Application-level access_token: The access_token can be used to access all stores authorized
  2. grant_type = app_level_token: Generate and refresh access_token
Shop Level Authorization Code mode
  1. Store-level access_token: The access_token can be used to access one store authorized
  2. grant_type = shop_level_authorization_code: Use authorization_code to generate access_token, and return refresh_token for subsequent refresh
  3. grant_type = refresh_token: Use this parameter to refresh a new access_token and refresh_token, before the old access_token expires.

HOST: Keeta

DIRECTION:

Bodyapplication/jsonrequired
client_idstringrequired

Client identifier provided by Keeta.

grant_typestringrequired

The OAuth grant type.

Value:"app_level_token"
Discriminator
client_secretstringrequired

Client Secret provided by Keeta.(When grant_type = app_level_token, this field needs to be filled in)

curl -i -X POST \
  https://open.mykeeta.com/api/open/opendelivery/oauth/token \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "string",
    "grant_type": "app_level_token",
    "client_secret": "string"
  }'

Responses

Successful returns token request.

Bodyapplication/json
access_tokenstringrequired

A code representing the access token.

token_typestringrequired

The token type. Currently, the only supported type is bearer.

Example:"bearer"
expires_ininteger

The token expiration time in seconds

refresh_tokenstringrequired

A code representing the refresh token.
Condition: This field will be returned when the grant_type is shop_level_authorization_code or refresh_token. When the grant_type is set to app_level_token, the response does not contain this field.

Response
{ "access_token": "string", "token_type": "bearer", "expires_in": 0, "refresh_token": "string" }