Open tomchristie opened 8 years ago
Very useful service!
I am testing the coreapi against Spotify, but I get
coreapi action users users-profile -p user_id=xxx <Error: 401 Unauthorized> error: { message: "No token provided" status: 401 }
How do I authenticate to the API properly using Spotify client id and client secret?
I believe when I wrote this that unauthenticated access returned a subset of functionality, eg. search. Could be that the policy has changed? Anyone else replicate the behavior above?
Yep, it looks like all the requests, including search, requires authentication. https://developer.spotify.com/web-api/authorization-guide/
I just tested this, and it seems to work:
coreapi headers add Authorization "Bearer xxxxxxxx"
I generated the token outside coreapi though (using spotipy https://spotipy.readthedocs.io/en/latest/), I guess there is no built in support to provide Spotify client_id and client_secret?
We're using spotify as an example service, but not authenticating with it. We should note this in the docs, and talk about how to handle authentication in this case.