快手广告平台:获取token

利用授权码auth_code,请求快手服务器,获取access_token和refresh_token及当前账户的快手信息流广告主ID。

请求地址:https://ad.e.kuaishou.com/rest/openapi/oauth2/authorize/access_token

请求方式:POST

数据格式:JSON

请求参数

字段 类型 备注
app_id long 申请应用后快手返回的app_id
secret string 申请应用后快手返回的secret
auth_code string 授权时返回的auth_code

返回参数

字段 类型 描述
code int 返回码
message string 返回信息
data struct
access_token string 用于验证权限的token
access_token_expires_in long access_token剩余有效时间,单位:秒
refresh_token string 用于获取新的access_token和refresh_token,并且刷新过期时间
refresh_token_expires_in long refresh_token剩余有效时间,单位:秒
advertiser_id long 快手广告主ID
advertiser_ids long[] 已授权账户所有的account_id

请求参数


curl -H "Content-Type:application/json" \
-d '
{
"app_id": 1,
"secret": "abcd",
"auth_code": "5991a7e2a6c7933b93"
} '


返回参数


{"code": 0,"message": "OK","data": {"access_token":"xxxxxxxxx","refresh_token_expires_in":xxxxxxxxx,"refresh_token":"xxxxxxxxx","access_token_expires_in":xxxxxxxxx,"advertiser_id": xxxxxxxxx
       }
}





文章均来自互联网如有不妥请联系作者删除QQ:314111741 地址:http://www.mqs.net/post/8633.html

相关阅读

添加新评论