Post

Replies

Boosts

Views

Activity

401 Unauthorized When Requesting Sandbox Test Notification Using app-store-server-library-java 5.2.0
I am using app-store-server-library-java:5.2.0. Following the official guide video, I downloaded and configured all required credentials, including the Key ID, Issuer ID, private key (.p8 file), and Bundle ID. However, when I try to send a test notification in the Sandbox environment, the request consistently returns a 401 Unauthorized error without any additional error message or details. One difference from the guide is how I handle the private key file. The guide reads the .p8 file directly from a file path on the server. In my environment, I cannot store external files on the server, so I Base64-encode the contents of the .p8 file, store it as an environment variable, and then decode it back to its original content before initializing the App Store Server API client. As far as I can tell, the decoded content matches the original key file exactly, but I am wondering whether this approach could cause any issues with authentication or JWT generation. Are there any additional prerequisites, permissions, agreements, or configuration steps that must be completed before this feature can be used? I have spent a significant amount of time troubleshooting this issue, but I have been unable to identify the root cause from the available documentation or error responses. Any guidance or suggestions would be greatly appreciated. Thank you for your help. Additional information: Library: app-store-server-library-java 5.2.0 Environment: Sandbox Credentials configured: Key ID, Issuer ID, Bundle ID, Private Key (.p8) Private key handling: Base64 encoded in environment variables, then decoded before client initialization Result: HTTP 401 Unauthorized with no response body or error details
1
0
99
3h
401 Unauthorized When Requesting Sandbox Test Notification Using app-store-server-library-java 5.2.0
I am using app-store-server-library-java:5.2.0. Following the official guide video, I downloaded and configured all required credentials, including the Key ID, Issuer ID, private key (.p8 file), and Bundle ID. However, when I try to send a test notification in the Sandbox environment, the request consistently returns a 401 Unauthorized error without any additional error message or details. One difference from the guide is how I handle the private key file. The guide reads the .p8 file directly from a file path on the server. In my environment, I cannot store external files on the server, so I Base64-encode the contents of the .p8 file, store it as an environment variable, and then decode it back to its original content before initializing the App Store Server API client. As far as I can tell, the decoded content matches the original key file exactly, but I am wondering whether this approach could cause any issues with authentication or JWT generation. Are there any additional prerequisites, permissions, agreements, or configuration steps that must be completed before this feature can be used? I have spent a significant amount of time troubleshooting this issue, but I have been unable to identify the root cause from the available documentation or error responses. Any guidance or suggestions would be greatly appreciated. Thank you for your help. Additional information: Library: app-store-server-library-java 5.2.0 Environment: Sandbox Credentials configured: Key ID, Issuer ID, Bundle ID, Private Key (.p8) Private key handling: Base64 encoded in environment variables, then decoded before client initialization Result: HTTP 401 Unauthorized with no response body or error details
Replies
1
Boosts
0
Views
99
Activity
3h