apple / app-store-server-library-java

MIT License
151 stars 38 forks source link

How to call App Store Server API sandbox environment #92

Closed sigriswil closed 3 months ago

sigriswil commented 5 months ago

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. 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? Is there any way to determine if I should call into a sandbox environment when I receive a 401 status code from a production endpoint?

Sometimes it's a production transaction and JWT hasn't expired, but I'm getting a 401 status code response and calling it into a sandbox environment.

Please let me know the solution.

alexanderjordanbaker commented 5 months ago

@sigriswil If you don't have a production release of the app, you are not allowed to use the production App Store Server API. Once you release an app for the first time in production, then you will be able to receive a TRANSSACTION_ID_NOT_FOUND exception

sigriswil commented 5 months ago

@sigriswil If you don't have a production release of the app, you are not allowed to use the production App Store Server API. Once you release an app for the first time in production, then you will be able to receive a TRANSSACTION_ID_NOT_FOUND exception

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?

hakusai22 commented 5 months ago

@sigriswil If you don't have a production release of the app, you are not allowed to use the production App Store Server API. Once you release an app for the first time in production, then you will be able to receive a TRANSSACTION_ID_NOT_FOUND exception

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?

Is this the scene? (httpStatusCode=401, apiError=null, apiErrorMessage='null') https://github.com/apple/app-store-server-library-java/issues/96

sigriswil commented 5 months ago

@sigriswil If you don't have a production release of the app, you are not allowed to use the production App Store Server API. Once you release an app for the first time in production, then you will be able to receive a TRANSSACTION_ID_NOT_FOUND exception

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?

Is this the scene? (httpStatusCode=401, apiError=null, apiErrorMessage='null') #96

Yes. I happen in the 'Get Transaction Info' API.

alexanderjordanbaker commented 3 months ago

The issue appears to have changed into a duplicate of https://github.com/apple/app-store-server-library-java/issues/96, closing this issue in favor of that issue