Auth
Connect a Google Account
Last updated
Connect a Google Account
Last updated
There are 2 steps for connecting a google account. The first step is to request a Google OAuth URL.
GET
https://api.pyas.io/google/oauth
email*
String
a user's email address
state
String
optional application state
x-api-key*
String
API key
The next step is to connect the account. After you get an OAuth URL, you should direct your user to that URL in the browser. The user will then have to authorized/allow access on the OAuth screen. Once the user allows access, Google will redirect the user back to whatever redirect URL that you've set in Pyas. The URL will contain a code
parameter, which we will use in the connect request.
POST
https://api.pyas.io/google/connect
Connect Google Account
x-api-key*
String
API key
code*
String
code returned from Google OAuth
name*
String
user's full name
Note: Be sure to save the accountId
returned from the successful connect request. You will need it in order to access the user's Google calendar.