尝试从Tiktok的API从v1迁移到v2端点。目前版本1对我有效,但我对https://open.tiktokapis.com/v2/oauth/token/端点的请求不断返回
{
"error": "invalid_request",
"error_description": "The request parameters are malformed.",
"log_id": "202308141814065FE27A58513347021AF1"
}
我正在通过Postman测试这个,这里是我的请求的截图:
用于获取传递到postman请求中的“代码”的url是https://www.tiktok.com/v2/auth/authorize/?client_key=abcdefg&scope=user.info.basic,user.info.profile,user.info.stats,video.list&response_type=code&state=abcdefg&redirect_uri=https://www.test.com/redirect
我已经向Tiktok请求了对log_id的支持,他们说这是因为“请求中没有设置授权类型”。我在Postman的头中使用了applicable/x-www-form-urlencoded,所以如果这是问题所在,我不知道还需要修改什么。
1条答案
按热度按时间cx6n0qe31#
我认为你的问题是因为你在queryparams中传递参数,它们必须在body params中:
你也可以尝试在postman中导入这个curl,它在官方文档中:
参考:https://developers.tiktok.com/doc/oauth-user-access-token-management