app-store-server-library-java icon indicating copy to clipboard operation
app-store-server-library-java copied to clipboard

How to call App Store Server API sandbox environment

Open sigriswil opened this issue 1 year ago • 4 comments

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.

sigriswil avatar May 01 '24 09:05 sigriswil

@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

alexanderjordanbaker avatar May 04 '24 00:05 alexanderjordanbaker

@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?

sigriswil avatar May 04 '24 10:05 sigriswil

@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

hakusai22 avatar May 04 '24 10:05 hakusai22

@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.

sigriswil avatar May 04 '24 11:05 sigriswil

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

alexanderjordanbaker avatar Jun 06 '24 05:06 alexanderjordanbaker

I would advise everyone to go through this official video provided by apple, to handle server api. i was able to send test notification by following this video. app store server library

shubham-scaletech avatar Jan 29 '25 11:01 shubham-scaletech