Deezer OAuth CLI
Source Code: https://github.com/browniebroke/deezer-oauth-cli
A small CLI to quickly obtain an API token for the Deezer API.
Obtaining API token to develop API applications can be complicated and sometimes feel like a chicken and egg situation: it's hard to play with the API without a token, but it can be difficult to get a token without an application to do the OAuth flow.
Given the app ID and secret, this tool lets you quickly get an API token.
Installation
Install this via pip (or your favourite package manager):
pip install deezer-oauth-cli
Usage
Before starting to use this tool, you first need to declare your Deezer app in their developer portal. Create a new app with the following Redirect URL: http://localhost:8080/oauth/return
.
Once created, Deezer will generate an application ID and secret key for you, that's the 2 parameters that you need to run this tool:
$ deezer-oauth APP_ID APP_SECRET
This will:
- Spin up a webserver in the background running at
http://localhost:8080
. - Open your browser to grant authorisation access to your Deezer account.
- Redirect to a page showing the API token & expiry.
- Write the token to a
.env
file.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
Credits
This package was created with
Cookiecutter and the
browniebroke/cookiecutter-pypackage
project template.