post__auth_google_exchange
Code Samples
# You can also use wget
curl -X POST https://backend.flashback.tech/auth/google/exchange \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /auth/google/exchange
Exchange Google Authorization Code
Exchange Google authorization code for access token.
This endpoint completes the OAuth flow by exchanging an authorization code for an access token. Use this when you have an authorization code from the Google OAuth consent screen.
OAuth Flow:
Redirect user to Google OAuth consent screen
User authorizes your application
Google returns authorization code
Call this endpoint with the code
Receive access token for use with
/auth/google
Body parameter
{
"code": "4/0AfJohXn..."
}
Parameters
body
body
object
true
none
» code
body
string
true
Google authorization code from OAuth consent screen
Example responses
200 Response
{
"success": true,
"token": "string",
"refreshToken": "string",
"expiresAt": 0
}
Responses
Response Schema
Status Code 200
» success
boolean
false
none
none
» token
string
false
none
Google access token
» refreshToken
string
false
none
Google refresh token
» expiresAt
integer
false
none
Token expiration timestamp
Last updated
Was this helpful?