Skip to main content

v2.public.refresh_access_token

POST /api/v2/auth/access_token/get

Use this API to refresh the access_token after it expires. Refresh_token can be used once only, this API will also return a new refresh_token. Please use the new refresh_token for the next RefreshAccessToken call

Endpoint URL

URL: https://partner.shopeemobile.com/api/v2/auth/access_token/get

Common Request Parameters

NameTypeSampleDescription
partner_idint1Partner ID is assigned upon registration is successful. Required for all requests.
timestamptimestamp1610000000This is to indicate the timestamp of the request. Required for all requests. Expires in 5 minutes.
signstringe318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2Signature generated by partner_id, api path, timestamp and partner_key via HMAC-SHA256 hashing algorithm. More details: https://open.shopee.com/documents?module=87&type=2&id=58&version=2

Request Parameters

NameTypeRequiredSampleDescription
refresh_tokenstringTrue4c7259534969484e71734d695a6e6d55Use refresh_token to get a new access_token. Each refresh_token is valid for 30 days, and can only be used once by either a shop_id or merchant_id or supplier_id or user_id.
partner_idint64True2001887The partner_id obtained from the App. This partner_id is inserted into the body.
shop_idint64False322300222The shop_id that granted authorization to your App. Only the shop_id or merchant_id or supplier_id or user_id can be selected as the input parameter, and they must be refreshed separately.
merchant_idint64FalseThe merchant_id that granted authorization to your App. Only the shop_id or merchant_id or supplier_id or user_id can be selected as the input parameter, and they must be refreshed separately.
supplier_idint64FalseThe supplier_id that granted authorization to your App. Only the shop_id or merchant_id or supplier_id or user_id can be selected as the input parameter, and they must be refreshed separately.
user_idint64FalseThe user_id that granted authorization to your App. Only the shop_id or merchant_id or supplier_id or user_id can be selected as the input parameter, and they must be refreshed separately.

Response Parameters

NameTypeSampleDescription
errorstringIndicate error type if hit error. Empty if no error happened.
messagestringIndicate error details if hit error. Empty if no error happened.
request_idstringThe identifier for an API request for error tracking.
partner_idint64Returned when the API call is successful. The partner_id you used for this refresh.
shop_idint64Returned when the API call is successful. The shop_id for this refresh.
merchant_idint64Returned when the API call is successful. The merchant_id for this refresh.
supplier_idint64Returned when the API call is successful. The supplier_id for this refresh.
user_idint64Returned when the API call is successful. The user_id for this refresh.
access_tokenstringReturned when the API call is successful. Each new access_token is a dynamic token that can be used multiple times. It expires after 4 hours.
refresh_tokenstringNew refresh_tokenReturned when the API call is successful. Use a refresh_token to get a new access_token. Each refresh_token is valid for 30 days, and can only be used once by either a shop_id or merchant_id or supplier_id or user_id.
expire_intimestampReturned when the API call is successful. The validity period of the access_token, in seconds.