Skip to main content
POST
This endpoint is called from the iOS app immediately after a successful Google Sign-In flow. The OAuth tokens obtained from Google are forwarded here to be securely stored in AWS Secrets Manager, enabling PayPulse to read Gmail invoices on the user’s behalf.

Authentication

string
required
Bearer JWT token obtained from Login or Sign up. Format: Bearer <access_token>.

Request body

Accepts application/json or application/x-www-form-urlencoded.
string
required
The Google OAuth 2.0 access token returned after Google Sign-In.
string
The Google OAuth 2.0 refresh token. Required to renew access when the access token expires.
number
default:"3600"
Lifetime of the access token in seconds.
string[]
Array of OAuth scope strings granted by the user (e.g. ["https://www.googleapis.com/auth/gmail.readonly"]). When sending application/x-www-form-urlencoded, provide a comma-separated string.
string
The Google account email address associated with the tokens.

Response

string
A human-readable confirmation message. Example: "Gmail OAuth tokens stored successfully!"
number
HTTP status code. 201 on success.
object

Error responses

Error responses follow this structure: