Allow open_browser to be set on creation of auth_manager (SpotifyOAuth/SpotifyPKCE) (#574)

* Fix plamere/spotipy#560

* Adhere to code style

* Update CHANGELOG.md for changes in 939f869bbc

* open_browser passed to get_auth_response should take precedence over the same argument in the constructor

* Update FAQ

* Add information about headless auth

* Add headless auth example
This commit is contained in:
Nick authored and GitHub committed 2020-09-12 12:14:08 +01:00
1 parent a42f2ccd0f
commit 87fe473672
4 files changed
+59 -30

No files matched your search

+8 -1
View File
@@ -40,4 +40,11 @@ Problem: you can see a track on the Spotify app but searching for it using the A
Solution: by default `search("abba")` works in the US market.
To search for in your current country, the [country indicator](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
must be specified: `search("abba", market="DE")`.
must be specified: `search("abba", market="DE")`.
### How do I obtain authorization in a headless/browserless environment?
If you cannot open a browser, set `open_browser=False` when instantiating SpotifyOAuth or SpotifyPKCE. You will be
prompted to open the authorization URI manually.
See the [headless auth example](examples/headless.py).