★Spotify APIで好きなアーティスト情報を取得するのに成功

参考にさせてもらったクラスメソッドさんの記事

dev.classmethod.jp



検索画面

https://open.spotify.com/search



検索結果 (Mr.children)

open.spotify.com



手順 (1)

クライアントアプリケーションの登録を行う

手順(2)

Client Credentials Flowでアクセストークンを取得

$ echo -n {client_id}:{Client_Secret} | base64
$ curl -X "POST" -H "Authorization: Basic {encoded_output}" \
-d grant_type=client_credentials https://accounts.spotify.com/api/token

=> 結果として、"access_token"キーにバリューが入って返ってくる。

curl -H "Authorization: Bearer {access_token}"  \
GET https://api.spotify.com/v1/artists/1qma7XhwZotCAucL7NHVLY

以上



では、アーティストをGUIで検索した分をAPIコールで処理してみよう。

qiita.com

github.com