Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get spotify refresh token? #3

Closed
Phoenix-rat opened this issue Feb 2, 2023 · 1 comment
Closed

How to get spotify refresh token? #3

Phoenix-rat opened this issue Feb 2, 2023 · 1 comment

Comments

@Phoenix-rat
Copy link

Spotify access token refresh token nasıl alınacak bilgi verebilir misiniz?

@barbecue
Copy link
Owner

barbecue commented Feb 3, 2023

Merhaba,

  • İlk öncelikle Spotify developers dashboard üzerinden client_id ve client_secret bilgilerinizi alın.
  • Ardından https://accounts.spotify.com/authorize?response_type=code&client_id=$CLIENT_ID&scope=$SCOPE&redirect_uri=$REDIRECT_URI urlsinde bulunan $CLIENT_ID, $SCOPE, $REDIRECT_URI kısımlarını gerekli şekillerde doldurmalısınız.
    Bizim durumumuzda bize lazım olacak scope user-read-recently-played.
    Bu scope olmadan spotify dinleme geçmişinize erişemezsiniz. Yani bağlantı şu şekilde gözükmelidir. https://accounts.spotify.com/authorize?response_type=code&client_id=$CLIENT_ID&scope=user-read-recently-played&redirect_uri=https://tuna.one
  • Daha sonra link sizi https://tuna.one?code=$CODE örneğindeki gibi bir kod sayfasına göndericek. Kodunuzu kopyalayın ve kaydedin.
  • Daha sonrasında curl aracılığı ile Spotify API'ya request atarak refresh tokeninizi alabilirsiniz.
    curl -d client_id=$CLIENT_ID -d client_secret=$CLIENT_SECRET -d grant_type=authorization_code -d code=$CODE -d redirect_uri=$REDIRECT_URI https://accounts.spotify.com/api/token

For English Tutorial (Source): https://benwiz.com/blog/create-spotify-refresh-token/

@barbecue barbecue closed this as completed Feb 3, 2023
@barbecue barbecue pinned this issue Feb 3, 2023
@barbecue barbecue changed the title Spotify access token refresh token. How to get spotify refresh token? Feb 3, 2023
Repository owner locked and limited conversation to collaborators Mar 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants