Skip to main content
Solved

"The API key is not intended for the Platform" while purchasing in iOS app running on Apple Silicon Mac


Forum|alt.badge.img

I’m testing my iOS app (designed for iPhone/iPad) on Apple Silicon, and when trying to purchase a subscription I get the next error:

ERROR: 💰 Product purchase for 'pro_plan_subscription' failed with error: PurchasesError(error: There was an unknown backend error., userInfo: ["NSLocalizedDescription": "There was an unknown backend error. The API key is not intended for the Platform. (7810)", "NSUnderlyingError": Error Domain=RevenueCat.BackendErrorCode Code=-1 "The API key is not intended for the Platform. (7810)" UserInfo={rc_backend_error_code=7810, NSLocalizedDescription=The API key is not intended for the Platform. (7810)}, "rc_backend_error_code": 7810, "readable_error_code": "UNKNOWN_BACKEND_ERROR", "source_file": "RevenueCat/HTTPClient.swift:886", "rc_response_status_code": 403, "source_function": "parseUnsuccessfulResponse()"])

 

I’ve checked the RevenueCat admin dashboard and ensured there’s no separate option for Mac App Store. There’s only one unified AppStore option for iOS, macOS, tvOS, so it means the API key should be correct for Mac App Store too.

Could you please advise, how can it be resolved?

Note: Purchases are working 100% correctly when running on iOS.

Environment: "@revenuecat/purchases-capacitor": "9.0.7" Capacitor plugin in Ionic App.

Best answer by Haley Pace

Hi ​@DmitryS, on my end I was able to find your project and in your server logs I see your Google API key being used when the platform is iOS which is where the “The API key is not intended for the Platform” error is coming from. Please make sure to be using your Apple API key and let me know if it works after.

 

 

View original
Did this post help you find an answer to your question?
This post has been closed for comments

5 replies

Andy
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 237 replies
  • January 17, 2025

Hi! What does the API Key that you’re initializing the SDK with look like? It should look like `appl_og83wgo8qw3`, or rather, it should start with an `appl_` prefix for it to work on apple platforms


Forum|alt.badge.img
  • Author
  • New Member
  • 3 replies
  • January 20, 2025

Yes it starts with `appl_` prefix and then 27 random symbols, 32 symbols total. Again, let me remind you - purchases are working 100% OK when iOS app is launched on iPhone/iPad and not working when iOS app is launched on Apple Silicon Mac. It uses the same code base and the same API key.

In addition I can say, that all the Apple native stuff seems to be working smoothly - I can get “Purchase succeeded” App Store alert on mac when doing purchase, but RevenueCat seems to not handle it properly - probably because it detects it’s running on mac.


Forum|alt.badge.img
  • Author
  • New Member
  • 3 replies
  • January 27, 2025

Guys from RevenueCat stuff, could you help please? It’s a pretty critical issue because it blocks purchases in app when running on Mac.


Forum|alt.badge.img+8
  • RevenueCat Staff
  • 509 replies
  • Answer
  • January 31, 2025

Hi ​@DmitryS, on my end I was able to find your project and in your server logs I see your Google API key being used when the platform is iOS which is where the “The API key is not intended for the Platform” error is coming from. Please make sure to be using your Apple API key and let me know if it works after.

 

 


Forum|alt.badge.img
  • Author
  • New Member
  • 3 replies
  • February 3, 2025

Hi Haley, indeed - the Angular’s “this.platform.is(‘ios’)” check returns ‘false’ when running on mac, so the wrong platform was detected and wrong API key was used. I’ve used Capacitor’s platform check and now purchasing works smoothly on mac.

Thank you for help!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings