![]() I can then run the script like this: myscript. Made to Be Found Spotify for Artists Made to Be Found: A guide for artists to better understand how fans find and fall in love with their music on Spotify. In my case I want to read input in the Terminal in the format "artist album" and output the corresponding spotify URI, which is exactly what the following shell script does: #!/bin/bashĪccess_token=$(curl -s -X "POST" -H "Authorization: Basic $creds" -d grant_type=client_credentials | awk -F"\"" '') With that access token it's possible to make requests to the API endpoints, that don't need user authorization, for example: curl -H "Authorization: Bearer " ""Īll available endpoints can be found here: Request authorization with the encoded credentials, which provided me with an access token: curl -X "POST" -H "Authorization: Basic " -d grant_type=client_credentials ![]() Here's what I did:Ĭreate an application on the Dashboard at and copy client ID and client secretĮncode client ID and Client secret with base64: echo -n | openssl base64 Since I don't need refreshable access tokens for that and I don't need to access user data, I decided to go with the Client Credentials Authorization Flow ( ). ![]() What I want to do is retrieve Spotify album URIs from the Spotify Web API by searching for specifc albums. So, I spent some more time deciphering the instructions at and I actually found a rather simple solution for this. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |