No refresh token (error)

Error: Error: No refresh token
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest.node.js:794:27)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:370:47

So im not understanding why the above wont let me post to google groups. I need to update user members. Im using an HTTP Request and it worked a couple times and now its not.

The message means that your access-token did expire, n8n tried to refresh it but it did fail because on OAuth authentication no refresh-token got returned. For that reason is it now missing and can so not request a new access-token, as to do so it requires that refresh-token.

That happens because Google somehow does return a refresh-token only for the very first authentication request by default. Guess you authenticated maybe multiple times.

The solution is to tell Google to always return a refresh-token. That can be done if you set in your Google OAuth2 credentials the parameter “Auth URI Query Parameters” to “access_type=offline&prompt=consent”. Once you did that and then connect again, it should do two things:

  1. Give you a new access-token that the requests are possible again
  2. This time also return a refresh-token so that it also keeps on working once the access-token expired

Hope that helps!

1 Like

It this the way it should look? With the quotes?

Can you remove the quotes and then try again?

so i got it to work now. i had to use quotes and make it look like this
image

1 Like