I’m trying to set up Gmail OAuth in Scriptable, I got the initial auth to work using https://open.scriptable.app
as the redirect URI. But it seems like Google returns the temporary access token in the hash fragment of the URL rather than a query parameter, as shown in their documentation example:
An access token response:
https://oauth2.example.com/callback#access_token=4/P7q7W91&token_type=Bearer&expires_in=3600
In Simon’s example for Slack OAuth, it seems like their API returns it as a query parameter.
The issue is that I can’t think of a way to access this portion of the URL that opens Scriptable – in the example above, args.queryParameters
contains the token, but there’s no way I can find to access the full URL or hash fragment.
Has this been solved by anyone, or is there a workaround I’m missing?
Edit: I may be using the wrong grant type, I’ll follow up tomorrow.