Actions on Google - How do I unlink my account?

Here is my situation: I am developing a Google Assistant application using Dialogflow. My service requires the user to connect to their account. Therefore, I implemented OAuth 2.0 Authorization Code Flow, as described in the account that links the Google manual . Now my users can associate my Assistant app with their account to activate it vocally. It works great, no problem with that.

My question is here: I have to enable my users to unlink the Google Assistant and their account. To do this, I delete authorizations on my side and, of course, returns a 401 "invalid_grant" response when I receive a request from the assistant. My question is how can I notify Google that the access token has been revoked and that the user needs to reconnect the helper application to his account. Typically, the assistant notifies the user as follows:

It looks like your MyAppName account is not set yet

Without this, Google continues to send me requests until it makes an update token and receives a 401 response. Is there an API or a way to directly withdraw authorization on the side of the Google assistant?

Thanks for any answers; -)

+4
1

, Dialogflow reset 401.

Google API .

https://accounts.google.com/o/oauth2/revoke?token={token}.

.

. , Dialogflow reset . Dialogflow, , .

0

Source: https://habr.com/ru/post/1690560/


All Articles