[GH-ISSUE #172] Can you write a more accurate tutorial about the auto-refreshing token? #109

Closed
opened 2026-02-27 19:26:07 +03:00 by kerem · 4 comments
Owner

Originally created by @DarkFighterLuke on GitHub (Nov 11, 2019).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/172

I have not clear in mind how the auto-refresh mechanism works and how to use it.
Can you help me?

Maybe the tips given here can be useful to feed the relative documentation page

Originally created by @DarkFighterLuke on GitHub (Nov 11, 2019). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/172 I have not clear in mind how the auto-refresh mechanism works and how to use it. Can you help me? Maybe the tips given here can be useful to feed the relative documentation page
kerem 2026-02-27 19:26:07 +03:00
  • closed this issue
  • added the
    docs
    label
Author
Owner

@jwilsson commented on GitHub (Nov 12, 2019):

Hi!
Absolutely, I'd be happy to! What do you think is missing right now?

<!-- gh-comment-id:552753695 --> @jwilsson commented on GitHub (Nov 12, 2019): Hi! Absolutely, I'd be happy to! What do you think is missing right now?
Author
Owner

@DarkFighterLuke commented on GitHub (Nov 12, 2019):

I think the code snippets should be more complete. I mean, maybe you can write some other lines of code where at the moments there are comments, making the examples awesome.

Furthermore, I have not really clear how to work with an existing refresh token. So, I haven't at the moment any token in the database: is it necessary to follow that part if I set the autorefresh option since the first login?

Thanks for your timely response!

<!-- gh-comment-id:552784971 --> @DarkFighterLuke commented on GitHub (Nov 12, 2019): I think the code snippets should be more complete. I mean, maybe you can write some other lines of code where at the moments there are comments, making the examples awesome. Furthermore, I have not really clear how to work with an existing refresh token. So, I haven't at the moment any token in the database: is it necessary to follow that part if I set the autorefresh option since the first login? Thanks for your timely response!
Author
Owner

@jwilsson commented on GitHub (Nov 12, 2019):

Cool! I'll look over the code examples and try co clarify some other things as well.

I can answer your second question right now though. As long has you have a valid refresh token you don't need an access token. Set auto_refresh to true and it'll fetch a new access token for you.

<!-- gh-comment-id:552886034 --> @jwilsson commented on GitHub (Nov 12, 2019): Cool! I'll look over the code examples and try co clarify some other things as well. I can answer your second question right now though. As long has you have a valid refresh token you don't need an access token. Set `auto_refresh` to `true` and it'll fetch a new access token for you.
Author
Owner

@DarkFighterLuke commented on GitHub (Nov 12, 2019):

Thank you @jwilsson !

Nice project! ;)

<!-- gh-comment-id:552887468 --> @DarkFighterLuke commented on GitHub (Nov 12, 2019): Thank you @jwilsson ! Nice project! ;)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-web-api-php#109
No description provided.