Failed at access token
NullVsNone opened this issue · comments
null commented
Trying to deploy your version of the now playing.
Clone the repo, then get my client/secret/refresh token.
Deployed, but for the function I'm now getting this. Did I mess up somewhere?
[GET] /api/spotify-playing
18:38:56:33
[ERROR] 2020-07-19T22:38:56.506Z 4c8fd06d-2e53-41f3-80e6-da1ad96075d4
Exception on /api/spotify-playing [GET]Traceback (most recent call last):
File "/var/task/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request()
File "/var/task/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e)
File "/var/task/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb)
File "/var/task/flask/_compat.py", line 39, in reraise raise value
File "/var/task/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request()
File "/var/task/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args)
File "./api/spotify-playing.py", line 143, in catch_all data = get_now_playing()
File "./api/spotify-playing.py", line 66, in get_now_playing token = refresh_token()
File "./api/spotify-playing.py", line 46, in refresh_token return repsonse_json["access_token"]KeyError: 'access_token'
null commented
Issue was just an expired token
MAJID NISAR commented
how did you solve the issue , i mean do the process again for token and change the environment variables ... in the vercel app, how long does the token last @NullVsNone @kittinan