Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Authorization issue w/ iOS

Authorization issue w/ iOS

Plan

Free/Premium

Country

United States

Device

(iPhone/Android)

 

We recently just published our application to the Google Play store, however, ran into an issue with publishing it to the App Store with our iOS version. 

 

The issue seems to be with the Client ID. We were granted the quota extension and the new Client ID works with the Android version, but not the iOS version. We used Flutter to create our Android and iOS apps so it's the same code between the two.  We created a new account to test the Development Mode Client ID, and that does work for the iOS version. So it's just the new client id in iOS we're having an issue with.

 

This is the error message we receive:
getAccessToken failed with  [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(authenticationTokenError, null, null, null).message
 

 

Does anyone know what the error message means and how to resolve it? And is there anything we are missing below that would be causing the issue? 

 

var authenticationToken = await SpotifySdk.getAccessToken(
    clientId: "xxxxxxxxxxxxxxxxxxxxxxxxxx",
    redirectUrl: "spotify-ios-quick-start://spotify-login-callback",
    scope:Constants.spotifyScopes);
 
 

Thanks in advance for your help and support. 

Reply
5 Replies

Try adding the bundle id for your iOS app to your Spotify developer application.

Thank you for your suggestion! We do have the bundle id for the iOS app already added to the Spotify developer dashboard. 

The ID you use for the redirectUrl in your copied code is "spotify-ios-quick-start". I think this should also be the same as the bundle ID.

XimzendRising Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.


@Ximzend wrote:

The ID you use for the redirectUrl in your copied code is "spotify-ios-quick-start". I think this should also be the same as the bundle ID.


This is false. "spotify-ios-quick-start://spotify-login-callback" is a URL with the custom URL scheme "spotify-ios-quick-start". This is completely separate from an iOS application bundle ID, although they could happen to be the same value.

Hey there - we tried both suggestions and they both presented the same error. 

Suggested posts