Auth
Connect a Google Account
Get OAuth URL
There are 2 steps for connecting a google account. The first step is to request a Google OAuth URL.
Get an OAuth URL
GET
https://api.pyas.io/google/oauth
Get a Google OAuth URL
Query Parameters
email*
String
a user's email address
state
String
optional application state
Headers
x-api-key*
String
API key
Connect Account
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.
Connect Account
POST
https://api.pyas.io/google/connect
Connect Google Account
Headers
x-api-key*
String
API key
Request Body
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.
Last updated