API 身份验证
使用 Tapjoy Offerwall API 时对 API 请求进行身份验证,从而获得授权访问权限来管理用户参与度和变现数据。
阅读时间1 分钟最后更新于 4 天前
请求访问权限
这些请求通过标准的双边 OAuth2 流程完成身份验证:先用编码后的 API 密钥来请求access_tokenaccess_token
POST /v1/oauth2/token Host: api.tapjoy.com Authorization: Basic <API Key> Accept: application/json
失败响应status 200 { “access_token”: “token_string”,“token_type”: “bearer”,“expires_in”: 3600,“refresh_token”: null }
status 401{ “error”: “Unauthorized” }
使用访问令牌
获得access_tokenaccess_tokenaccess_token令牌缺失/无效令牌响应POST /v4/audiences Host: api.tapjoy.com Authorization: Bearer <token_string> Accept: application/json
status 401 { “error”: “Unauthorized” }