HTTP 状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
200 | 28001007 | 参数不合法 | 重新检查入参,确认 OpenID 与应用对应 |
200 | 29002002 | ClientKey不合法 | 检查 Client Key 字段入参,确认应用当前状态正常 |
curl --location --request POST 'http://dev-cn.your-api-server.com/oauth/access_token/' \
--header 'Content-Type: application/json' \
--data-raw '{
"grant_type": "authorization_code",
"client_key": "tt10abc****",
"client_secret": "7802f4e6f243e659d51135445fe******",
"code": "ffab5ec26cd958fditn2GNr8Wx5m0i******"
}'
{
"data": {
"access_token": "act.f7094fbffab2ecbfc45e9af9c32bc241oYdckvBKe82BPx8T******",
"captcha": "",
"desc_url": "",
"description": "",
"error_code": 0,
"expires_in": 1296000,
"log_id": "20230525105733ED3ED7AC56A******",
"open_id": "b9b71865-7fea-44cc-******",
"refresh_expires_in": 2592000,
"refresh_token": "rft.713900b74edde9f30ec4e246b706da30t******",
"scope": "user_info"
},
"message": "success"
}