CrabBeach
CrabBeach

Reputation: 21

How to get a long term OAuth Token for New release

I am working for a course work that needs to console the new release albums, and I try to get OAuth Token in the API console, However it can only run short time, after half hour it does work. How to gain a long term OAuth Token for it ?

Upvotes: 1

Views: 366

Answers (1)

José M. Pérez
José M. Pérez

Reputation: 3279

The access tokens issued by the Spotify Web API have an expiration time of 1 hour. If you implement the Authorization Code flow you will get an additional refresh_token that you can use to obtain a new access token when the current one expires.

I recommend you to read the Spotify Web API Authorization Guide to get an overview of the OAuth 2.0 authorization framework, and also the beginner's tutorial that shows how to implement the authorization code flow step by step.

Upvotes: 1

Related Questions