0

Here is my Request Post URL:

https://open-api.tiktok.com/oauth/access_token/?client_key=fgjvjhg&client_secret=ghhjgjhgjkhjk&code=Web&grant_type=authorization_code

Here is the response which I got:

{ "data": { "captcha": "", "desc_url": "", "description": "Authorization code expired", "error_code": 10007 }, "message": "error" }

Here is the documentation page which I am following: https://developers.tiktok.com/doc/login-kit-manage-user-access-tokens

Please help me with that, thanks in advance.

user14419286
  • 1
  • 1
  • 2

2 Answers2

1

You are missing 2 values there:

  1. Code (Authorization code from Web/iOS/Android authorization callback)
  2. grant_type (should always be set as authorization_code)

Example request:

https://open-api.tiktok.com/oauth/access_token/?client_key={{key}}&client_secret={{secret}}&code={{client_unqiue_id}}&grant_type=authorization_code
Boar
  • 46
  • 2
0

Check your code to make sure you're not making duplicate requests. A second request will invalidate the first one and you'll get Authorization code expired.

Max S.
  • 1,383
  • 14
  • 25