401 Unautheticate error for production environment App Store Server API

Hello, I call transaction information for several apps. And I don't have environment information.

That's why I'm calling the sandbox environment as an official guide.

  1. Call the endpoint using the production URL. If the call succeeds, the transaction identifier belongs to the production environment.
  2. If you receive an error code 4040010 TransactionIdNotFoundError, call the endpoint using the sandbox environment.
  3. If the call succeeds, the transaction identifier belongs to the sandbox environment. If the call fails with the same error code, the transaction identifier isn’t present in either environment.

However, unlike the official guide, certain apps sometimes use production URLs to call endpoints to receive 401 status codes and successfully call endpoints using the sandbox environment.

Why does this difference occur unlike the official guide?

I receive a 401 status code in response from a production environment endpoint, I want to know if this status code is a real error or if I have to call it into a sandbox environment.

Can I check with the key 'x-apple-request-uuid' in the response header?

Please let me know the solution.

Replies

Do those apps have a production release? You are not allowed to use the production APIs for an app until you have a production release.

  • Thank you for your answer. We manage multiple app information and don't know if the apps have a production release. Even if there is a production release, the token hasn't expired, and very occasionally returns a 401 response for unknown reasons. Is there a way to know if it's an actual 401 error, or a 401 error because there's no production release?

Add a Comment