0

I need to find albums using the "Mozart" query. When I use Rdio API Console. it returns several albums. But in case of the curl utility, it returns nothing.

{"status": "ok", "result": []}

For searching I use the following command:

curl -X POST 'https://services.rdio.com/api/1/?method=searchSuggestions&types=Album&query=Mozart' -H 'Authorization: Bearer AAAAAWEAAAAAAhkPNgAAAABV1duTVdaEUwAAABpuaWlyZXR0eXZiZG1uZjdjbzJhNWxieHdkddStjPwN8G3shj01cryrkCYZT3pq429kU8cRqbPP85Ad'

Why this happens?

Maybe I need to specify the scope parameter while requesting OAuth 2.0 access token?

1 Answers1

0

The parameters must be passed in the body of the request, not in the query string. So the command should be:

curl -X POST 'https://services.rdio.com/api/1/' \
    -H 'Authorization: Bearer ACCES_TOKEN' \
    -d 'method=searchSuggestions&types=Album&query=Mozart'
devin_s
  • 3,345
  • 1
  • 27
  • 32
  • The result is the same as above. {"status": "ok", "result": []} –  Aug 26 '15 at 07:45
  • Make sure you're making the call as an authenticated user. http://www.rdio.com/developers/docs/guides/regions/ – devin_s Sep 01 '15 at 17:43