zmb3 / spotify

A Go wrapper for the Spotify Web API
Apache License 2.0
1.4k stars 293 forks source link

Question regarding authentication #10

Closed petergloor closed 8 years ago

petergloor commented 8 years ago

Is there any way to do the authentication process completely inside go, without having to use an external browser for the login part? I could not find any working solution so far.

zmb3 commented 8 years ago

If you want to access private data, you must use either the "Authorization Code" flow, which requires that the user grant permission in a browser. There's no way around this.

This is actually mentioned in Spotify's FAQ. The best you can do is follow the flow to get the access token and refresh token once, and then after that you can refresh the token without using the browser.