# Pre-authorization Code
The pre-authorization code (pre_auth_code) is a necessity required by the third-party platform to perform operations on behalf of the authorizer. A pre-authorization code is only valid for 10 minutes and the relevant API can only be called after you obtain a token.
# Request Address
POST https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode?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 |
POST data example:
{
"component_appid": "appid_value"
}
# Parameters of Returned Result
| Parameter | Type | Description |
|---|---|---|
| pre_auth_code | string | Pre-authorization code |
| expires_in | number | Validity period (in sec) |
Example of returned result
{
"pre_auth_code": "Cx_Dk6qiBE0Dmx4EmlT3oRfArPvwSQ-oa3NL_fwHM7VI08r52wazoZX2Rhpz1dEw",
"expires_in": 600
}