Tony Owen
1 min readJan 14, 2019

--

Thanks for the article, it got me very close. However, I ran into a problem. Going to post here incase anyone has the same.

When using this, my authentication worked fine, for 1 hour. After that I received no accessToken :(

To get around this I had to use the following Auth URL:

https://accounts.google.com/o/oauth2/auth?access_type=offline&prompt=consent

I think the important part is `prompt=consent`, this ensures that a refresh token is always given. The problem being that if you auth for the first time, a refresh token is returned. If you were then to unlink in Alexa app, and then auth again, no refresh token is returned. So you’re then authorised in the app, but not actually authorised as your token is invalid.

Hopefully this helps someone.

--

--

Tony Owen
Tony Owen

Written by Tony Owen

Flutter Fan Boy & Android Developer

Responses (1)