Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to find the shared secret for iOS App Store receipt validation?

I am confused on where to find the shared secret needed to verify regular In-App purchases.

About one year ago I have created a server script which is call from my iOS app to verify the App Store receipt with Apples .../verifyReceipt endpoint.

This worked fine for the last year and now I would like to extend the script to do the same for a second app.

The problem: I don't remember where find the apps shared secret which has to be send with the receipt to Apple.


The secret for the first app ("MyApp") is stored within the script. But I was not able to re-find it within App Store Connect.

  • Login to App Store Connect
  • Go to "My Apps/MyApp/Features"
  • Click on the link "App Specific Shared-Secret" above the "In-App Purchases" list.

This shows the information, that there is no app specific shared secret for MyApp but only a master shared secret. I can display the master shared secret but it is not the same as the one stored in verification script.

Additionally the info text says, that the app specific shared secret is used to verify auto-renewable subscriptions. Nothing about consumable or non-consumable IAPs.

Thus I assume that this is not the shared secret I am looking for. But where else can I find the correct shared secret (the one that is already stored in my script?)

Where can I find the secret for my new app?

like image 323
Andrei Herford Avatar asked May 10 '19 08:05

Andrei Herford


People also ask

What is iOS App shared secret?

Apple's App-Specific Shared Secret is a unique key to receive receipts for your app's auto-renewable subscriptions. This key allows you to verify these in-app purchases.

How do I validate my Apple receipt?

Use the production URL https://buy.itunes.apple.com/verifyReceipt when your app is live in the App Store. For more information on these endpoints, see verifyReceipt. Verify your receipt first with the production URL; then verify with the sandbox URL if you receive a 21007 status code.


3 Answers

The 'App-Specific Shared Secret' is no longer available in the "Features" section. It can now be found within App Store Connect -> YOUR_APP -> App Store -> In-App Purchases -> Manage.

like image 134
Richard Gustavsson Avatar answered Oct 03 '22 10:10

Richard Gustavsson


Just to update this again as of July/2022 - it can now be found in App Store Connect -> YOUR_APP -> In-App-Purchases -> Subscriptions -> under the section titled "App-Specific Shared Secret" -> Manage

like image 32
Ronald Avatar answered Oct 01 '22 10:10

Ronald


Select your app in app-store connect --> Select Features Tab on top --> In-app purchase --> You will see the App specific shared secret at right corner.

enter image description here

like image 23
Abhijith Avatar answered Oct 01 '22 10:10

Abhijith