Custom appsAPIGET /oauth2

The GET /oauth2 endpoint performs the initial setup for OAuth version 2 accounts. Included with the request is a single query argument, callback_uri, which is the redirect URL that the user should be expected to be redirected to upon successful authentication with the third-party service. Return body should at least include a redirect_uri that the user should be forwarded to in order to complete setup. Replies are then POST'ed to this endpoint.

// GET /oauth2
{
    "redirect_uri": "https://accounts.google.com/o/oauth2/token?scope=openid+profile+email&client_secret=xxxxxxxxxxx&grant_type=authorization_code&redirect_uri=something&code=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Note: The OAuth implementation requires the account identifier to be oauth2 for OAuth version 2.