Get results for the user's region

40 views
Skip to first unread message

Pierre-Élie Fauché

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

I have a webapp where users link their Rdio account with OAuth so they can browse their Collection and for example the New Releases inside my app.
Right now my server is in the US so the New Releases are always the US ones, as they're based on my server's IP address.

Is there a way to get results for a particular region?

Actually I saw in a previous post that we can pass the parameter _region, but didn't see how to get the region for a particular user. With a special extra in the getCurrentUser method maybe?

What would be even better is a region determination based on the authenticated user, not the IP (i.e. unauthenticated call => IP based region / authenticated call => user-based region).

Thank you

Devin Sevilla

unread,
May 21, 2013, 1:56:07 PM5/21/13
to rdio...@googlegroups.com
If the API call is made using the user's OAuth token and secret, the
Rdio API will automatically take into account the user's region and
tailor the results. For example, if a German user authenticates with
your application, they will get German new releases regardless of
where your servers are located.

The manual version of this, is to call `currentUser
extras=streamRegion` and pass the streamRegion value as `_region`.

--
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.
>
>

Pierre-Élie Fauché

unread,
May 21, 2013, 2:22:14 PM5/21/13
to rdio...@googlegroups.com
That is not what I experience: with the same account, for New Releases, I have different results between by test server (AWS in the US) and my local machine (France).

Calls are correctly authenticated with OAuth in both cases.

Devin Sevilla

unread,
May 21, 2013, 2:45:01 PM5/21/13
to rdio...@googlegroups.com
Could you please send me a capture of the output for both cases?
Please includes the full request and response headers, if possible.

-- Devin

Pierre-Élie Fauché

unread,
May 21, 2013, 4:27:26 PM5/21/13
to rdio...@googlegroups.com
I captured 2 calls:
• getCurrentUser
• getNewReleases

Here is the capture from a server located in the US: http://d.pr/f/gBjv
And this is the capture from my computer in France: http://d.pr/f/HtuD

(the OAuth consumer keys is different between servers, that's intended).

I just saw that when I ask for the current user, "streamRegion" is different between the servers (!) so even storing this field and setting "_region" later won't fix.

Pierre-Élie Fauché

unread,
May 28, 2013, 6:48:01 AM5/28/13
to rdio...@googlegroups.com
any news?

Devin Sevilla

unread,
May 28, 2013, 6:55:25 PM5/28/13
to rdio...@googlegroups.com
It appears that user isn't a paying subscriber, the user's region is
associated with their payment method. Until the user becomes a paying
subscriber, we use the request's IP address to guess their region.

I've filed a task to investigate if we can use something better than
the requesting IP address.

https://github.com/rdio/api/issues/75

-- Devin

On Tue, May 28, 2013 at 3:48 AM, Pierre-Élie Fauché
<pierre.el...@gmail.com> wrote:
> any news?
>
>
> On Tuesday, May 21, 2013 10:27:26 PM UTC+2, Pierre-Élie Fauché wrote:
>>
>> I captured 2 calls:
>> • getCurrentUser
>> • getNewReleases
>>
>> Here is the capture from a server located in the US: http://d.pr/f/gBjv
>> And this is the capture from my computer in France: http://d.pr/f/HtuD
>>
>> (the OAuth consumer keys is different between servers, that's intended).
>>
>> I just saw that when I ask for the current user, "streamRegion" is
>> different between the servers (!) so even storing this field and setting
>> "_region" later won't fix.
>>
>> On Tuesday, May 21, 2013 8:45:01 PM UTC+2, Devin S. wrote:
>>>
>>> Could you please send me a capture of the output for both cases?
>>> Please includes the full request and response headers, if possible.
>>>
>>> -- Devin
>>>
>>> On Tue, May 21, 2013 at 11:22 AM, Pierre-Élie Fauché
>>> <pierre.el...@gmail.com> wrote:
>>> > That is not what I experience: with the same account, for New Releases,
>>> > I
>>> > have different results between by test server (AWS in the US) and my
>>> > local
>>> > machine (France).
>>> >
>>> > Calls are correctly authenticated with OAuth in both cases.
>

Pierre-Élie Fauché

unread,
May 29, 2013, 4:13:27 AM5/29/13
to rdio...@googlegroups.com
Thank you!
Reply all
Reply to author
Forward
0 new messages