I have created an application on the TikTok Partner platform that integrates with a custom development shop. I have created a REST API in Node.js that will act as a middleware and receive webhook responses from this.
I am trying to test out making sample requests to the TikTok Shop API and keep receiving the following response error:
{ "code": 105005, "message": "you should apply auth pkg for this api", "request_id": "20240912031540202F63D493EC970076FD" }
Heres an example of the request that I am making:
https://open-api.tiktokglobalshop.com/api/orders/detail/query?app_key={app_key}×tamp=1726109670&sign=5dd772bb4194cabf8f8f81f646e0a34cd00864c4f4af7ba3c00759e517b4ff87&access_token={access_token}
My signing function is working correctly and the access token for the above request has been received after an application is authenticated by calling the /api/v2/token/get
endpoint.
I have tried making this request with Node.js through Axios as well as manually making the request through Postman and receive the same response either way. Therefore, this problem does not seem specific to any library or language that I am using.
Does anyone know why this error occurs and how it can be solved? For context, I am manually calling the /token/get endpoint after a user is redirected to my Redirect URL
and storing the returned access_token in a local sqlite db to be used in subsequent requests.
TikTok offers a link here to common error codes but provides no sort of explanation as to what this response means.
Any help would be greatly appreciated!
EDIT 10.08.24
I opened a ticket with TikTok support. I had not given my application the proper API access. You can do this from within the app's dashboard XD
The error you're describing is related to one of two issues: