400 Invalid grant refresh token is invalid

Our clients report that their Pipedrive account gets disconnected. When we check our logs the response from pipedrive is 400 Invalid grant refresh token is invalid.
In 90% of the cases our clients says that they did not modify anything from their side.
The only solution right now it tell them to reconnect the integrations. But, this is generating a lot of unnecesary support for us.
How can we solve this issue, so it does no show up anymore?
The issue started dicember 2017 and until now is not solved.

Hey @victorpy

We’ve actually recently enabled verbose logging for your app so we should have some answers on this soon. We definitely realize it’s been a painful/long process working on this.

Looking over the past 9 hours on your app, it seems it is running smoothly now. Feel free to let me know (or send an email) if the issue with refresh token occurs again.

Great David!

Thanks for the support


Hello David,
We are having issues about expired tokens again. How can i send more log info so you can help us solve this?


Hey Victor,

Can you send the log to marketplace.devs@pipedrive.com? We’ll look into it further from there.

Hello Davis,
I sent a several emails to that address, no reply until now. So, im going to use this channel again, hoping that someone can help us.
Today, we have A LOT OF “Invalid grant refresh token is invalid” for more than 60 clients. This is really generating us a lot of unnecessary problems with our clients.
How can we solve this once and for all?

Hey Victor,

I’m really sorry to hear you’re running into issues with the refresh tokens. I see the email you sent directly to us and I’ll reply to that as I can add more details.

Hi @David
We are having the same issue here.

I already check our Oauth process and it is correct.
Can you give me some information on how to fix it?

Thanks and regards.

Hi @Sergio_Toledo,

Do you have any more details you could share on what you’re experiencing?

Sure @David .

We use OAuth for authentication and we are receiving many invalid refresh token messages in our log.
The response is:
response={"success"=>false, "message"=>"Invalid grant: refresh token is invalid", "error"=>"invalid_grant"}

I would like to know why the refresh_token becomes invalid.


Hello Sergio,

We also have that issue at least once a week for one or more
customers integrations. We could not find anything wrong from our
side that can make the refresh token invalid. From what we know,
the refresh token should not expire unless its revoked by the
user. But sometimes, the refresh token is invalid, even thou the
user didn’t make any modification to their account, at least
that’s what they commonly say.

Something we also found is that some permissions get revoked, and
we cannot create or access some resources in the Pipedrive
account. Also, in this case the customers didn’t modify anything
on their Pipedrive account.

The only solution we found for both issues is to reconnect the
client account with Pipedrive. The reconnect process is the same
process you use to create a new integration. So, we change the
client account to a Reset state, and enable a reconnect button,
that follow the connect process. After this, usually the account
reconnect without any issue.

Hope this can help you.

Best regards

1 Like

Thank you for your answer @victorpy.