# Getting/Refreshing API Call Token

When the Official Account/Mini Program API call token (authorizer_access_token) expires, you can use the refresh token (authorizer_refresh_token) to get a new token.

Note: The authorizer_access_token is valid for 2 hours. The developer must cache the authorizer_access_token so that calls to the "Get/Refresh API Call Token" API do not trigger the daily limit. For information about the caching method, see: http://mp.weixin.qq.com/wiki/2/88b2bf1265a707c031e51f26ca5e6512.html.

# Request Address

POST https://api.weixin.qq.com/cgi-bin/component/api_authorizer_token?component_access_token=COMPONENT_ACCESS_TOKEN

# Request Parameters

Parameter Type Required Description
component_access_token string Yes Token
component_appid string Yes Third-party platform's AppID
authorizer_appid string Yes Authorizer's AppID
authorizer_refresh_token string Yes Refresh token, which is obtained when getting the authorization information.

POST data example:

{
  "component_appid": "appid_value",
  "authorizer_appid": "auth_appid_value",
  "authorizer_refresh_token": "refresh_token_value"
}

# Parameters of Returned Result

Parameter Type Description
authorizer_access_token string Authorizer's token
expires_in number Validity period (in sec)
authorizer_refresh_token string Refresh token

Example of returned result

{
  "authorizer_access_token": "some-access-token",
  "expires_in": 7200,
  "authorizer_refresh_token": "refresh_token_value"
}