getPlaybackToken for a specific user

27 views
Skip to first unread message

Pierre-Élie Fauché

unread,
May 21, 2013, 1:57:40 PM5/21/13
to rdio...@googlegroups.com
Hi,

If I understand correctly, when playing a track with the Web Playback API, the playback token is only used to identify my app, and user identification is being handled by the Flash widget with a rdio.com cookie.

Would it be possible to handle user identification through the playback token?
The API method getPlaybackToken doesn't require authentication, but if called with OAuth credentials of a user, the returned token could identify the user and then the cookie wouldn't be necessary.

Let me explain why I need this: I have a webapp where users can connect their Rdio account and then browse the catalog, their collection, etc. They can also play Rdio tracks thanks to the Web Playback API. Everything works fine as long as they are signed-in on rdio.com.
The problem is the following: when they use another computer or browser, they can still browse Rdio content from my web-app (with authenticated calls from the server), BUT they will only access 30s previews of tracks because they are not logged-in to Rdio, even if I generated a playback token with their OAuth credentials.

So, is there a way to bypass the cookie restriction? With an authenticated call or by OAuth-signing the SWF url for example?

Thanks

Devin Sevilla

unread,
May 21, 2013, 6:41:57 PM5/21/13
to rdio...@googlegroups.com
The Web Playback API doesn't support authenticating a user through the
playback token. The user needs to be signed into Rdio in the browser
that they are using. You can use the `ready` callback to check if the
current user is authenticated and prompt them if needed.

See the hello playback example for detecting the user's state:

https://github.com/rdio/hello-web-playback/blob/master/hello.js#L56-L81

--
Devin Sevilla
API Engineer, Rdio Inc.
http://rdio.com/people/devin_s/
> --
> You received this message because you are subscribed to the Google Groups
> "Rdio API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rdio-api+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Reply all
Reply to author
Forward
0 new messages