- 支付
- 私域
- 公域
- 营销
- 资金
- 会员
- 支付宝身份验证
- APP 支付宝登录
- 获取会员信息
- 信用
- 安全
- 其他
换取授权访问令牌
开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/v3/alipay/system/oauth/token
alipay.system.oauth
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/v3/alipay/system/oauth/token' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "4b203fe6c11548bcabd8da5bb087a83b",
"grant_type": "authorization_code",
"refresh_token": "201208134b203fe6c11548bcabd8da5bb087a83b"
}'
响应示例响应示例
200 - 示例 1
{
"access_token": "20120823ac6ffaa4d2d84e7384bf983531473993",
"alipay_user_id": "已废弃,请勿使用",
"auth_token_type": "permanent",
"expires_in": "3600",
"open_id": "074a1CcTG1LelxKe4xQC0zgNdId0nxi95b5lsNpazWYoCo5",
"re_expires_in": "3600",
"refresh_token": "20120823ac6ffdsdf2d84e7384bf983531473993",
"union_id": "092aSPrsmhTbexLh9zgoYb2uvZNC4D8izCpGKTem8QiIOQb",
"user_id": "2088102150477652",
"auth_start": {}
}
请求参数
Body 参数application/json
code
string
可选
示例值:
4b203fe6c11548bcabd8da5bb087a83b
grant_type
string
授权方式
示例值:
authorization_code
refresh_token
string
可选
示例值:
201208134b203fe6c11548bcabd8da5bb087a83b
示例
返回响应
🟢200common response
application/json
Body
access_token
string
可选
示例值:
20120823ac6ffaa4d2d84e7384bf983531473993
alipay_user_id
string
已废弃,请勿使用
示例值:
已废弃,请勿使用
auth_token_type
string
可选
示例值:
permanent
expires_in
string
可选
示例值:
3600
open_id
string
支付宝用户唯一标识
示例值:
074a1CcTG1LelxKe4xQC0zgNdId0nxi95b5lsNpazWYoCo5
re_expires_in
string
可选
示例值:
3600
refresh_token
string
可选
示例值:
20120823ac6ffdsdf2d84e7384bf983531473993
union_id
string
可选
示例值:
092aSPrsmhTbexLh9zgoYb2uvZNC4D8izCpGKTem8QiIOQb
user_id
string
可选
示例值:
2088102150477652
auth_start
string
可选
示例值:
{}
🔴500请 求失败