Trying to migrate from Tiktok's API from v1 to v2 endpoints. Currently version 1 works for me but my request to the https://open.tiktokapis.com/v2/oauth/token/ endpoint keeps returning
{
"error": "invalid_request",
"error_description": "The request parameters are malformed.",
"log_id": "202308141814065FE27A58513347021AF1"
}
I'm testing this through Postman and here are screenshots of my request:
The url used to obtain the "code" passed into the postman request is 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
I've requested support from Tiktok for the log_id and they say its due to "grant type is not set in request." I'm using applicaiton/x-www-form-urlencoded in Postman's header so if that is the issue I'm not sure what else to modify.