mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 16:05:51 +03:00
[GH-ISSUE #95] CronJob #51
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @karschti on GitHub (Aug 18, 2017).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/95
I want to create a CronJob for a PHPScript.
Unfortunately, I do not get it.
I tried it with WGET.
Probably it is a problem with the callback.
It works in the browser.
Who can help - if possible with sample code
PHP Script
@jwilsson commented on GitHub (Aug 20, 2017):
Hi!
When the user authenticates, you'll get a refresh token which you should store and use to get a new access token when the old one has expired (the access token is valid for about an hour).
So, instead of authenticating the user in your cron job, I'd do something like this:
A quick example:
Hope this helps you out!
@karschti commented on GitHub (Aug 21, 2017):
Many Thanks
This was perfect