Update November 8, 2017
As of October 4, 2017, Google has updated its policy to expressly prohibit this. Around the same time, they also took technical measures to prevent this.
The part about enabling the calendar API is still true, although not enough to complete the given source question.
Original answer
In a broad sense, the tasks that must be completed should consist of four parts:
- Set up your project (in the cloud console) so that the calendar API is enabled and that the OAuth2 client is configured correctly.
- Configure the "Action for account" link in the action console.
- Configure actions in Google Integration for the API.AI agent to indicate that login is required.
- API.AI webhook , JSON. API Google.
, API- Google , OAuth2.
" ", " OAuth"
, "-" (... kinda...)
. "Action client", , Actions Google.
" URI" URI https://oauth-redirect.googleusercontent.com/r/your-project-id
, "--"... Cloud Console. :
"", . , .
"", " " . , - ( reset , ).
OAuth , Actions, , .
- " " "" .
" " Cloud Console. ( , " API Cloud Console" .)
URL https://accounts.google.com/o/oauth2/v2/auth
URL- https://www.googleapis.com/oauth2/v4/token
""
- , . - . ( , .) "" .
- . , . - , "".
API.AI
API.AI , Action.
-
webhook ! OAuth :
JavaScript, app.getUser().authToken
JSON, originalRequest.data.user.accessToken
, API Google, , .
- , .