Announcements

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

Android app remote SDK doesn't work?

Android app remote SDK doesn't work?

Plan

Premium

Country

India

Device

Xiaomi Mi A3, Google Pixel 6a, Emulator

Operating System

Android 13, 14

 

My Question or Issue

I want to create an app for personal use that can control playback in Spotify. So I tried to use the app remote SDK (https://github.com/spotify/android-sdk). The sample app works fine, it opens Spotify for authorization, and I can successfully control Spotify playback through the sample app.

 

But if I try to use my own client id and callback URLs, it simply fails with UserNotAuthorized error in the logs, and doesn't even open up the prompt for consenting to the authorization. I registered the same callback URL in the app settings in the developer dashboard too, so I don't think it's a callback URL mismatch issue.

 

The same thing happens with the auth-lib sample too. But when I go the the URL that is used to make the auth request (as it is logged), it opens fine in the browser. I'm really lost of what's happening here, there are a few questions I have:

 

1. Why is my client app not working, but Spotify's test app is? I ensured the client id and callback URL are all as per configured in the app?

2. What does the callback URL even do in the context of Android? The sample app uses "comspotifytestsdk://callback" as the callback URL, but the scheme is not registered in the manifest. So how does the Spotify app know where to redirect?

3. I tried using the same callback URL "comspotifytestsdk://callback" for my app as well, but that also doesn't work.

 

The exact error that is logged:

Connection failed.
com.spotify.protocol.client.error.RemoteClientException: {"message":"Explicit user authorization is required to use Spotify. The user has to complete the auth-flow to allow the app to use Spotify on their behalf"}
at com.spotify.protocol.client.RemoteWampClient.getRemoteClientException(RemoteWampClient.java:130)
at com.spotify.protocol.client.RemoteWampClient.access$200(RemoteWampClient.java:16)
at com.spotify.protocol.client.RemoteWampClient$1.onAbort(RemoteWampClient.java:43)
at com.spotify.protocol.client.WampRouterImpl.routeAbort(WampRouterImpl.java:100)
at com.spotify.protocol.client.WampRouterImpl.route(WampRouterImpl.java:26)
at com.spotify.protocol.client.AppProtocolCommunicator.onData(AppProtocolCommunicator.java:77)
at com.spotify.android.appremote.internal.RemoteServiceIo.handleMessage(RemoteServiceIo.java:108)
at com.spotify.android.appremote.internal.RemoteServiceIo.access$000(RemoteServiceIo.java:45)
at com.spotify.android.appremote.internal.RemoteServiceIo$IncomingHandler.handleMessage(RemoteServiceIo.java:86)

 

 

 

Reply
3 Replies

Hey Man, I am having the same issue with this. Where you able to do it? How did you do it? Do I need to pass my app for review before given the authorization?

HI, am facing the same issue, did you get any solution for this?

 

Did you add yourself as a user to your app in the Dashboard under User Management?

Suggested posts