Skip to content

Sign in with Google

POST
/login/google
curl --request POST \
--url https://api.proxyrequest.com/api/v1/login/google \
--header 'Content-Type: application/json' \
--data '{ "credential": "google-id-token" }'

Verifies a Google ID token, creates or links the matching customer account when needed, and returns an API token pair.

  • None

Enhanced Google OAuth authentication with comprehensive security validation and user management.

object
credential
required

Google ID token credential

string
>= 1 characters
client_id

Google OAuth client ID

string
>= 1 characters
select_by

User selection method

string
>= 1 characters
affiliate_code

Optional affiliate code

string
<= 50 characters
referral_code

Optional referral code

string
<= 50 characters
Examples
ExampleGoogleCredential

Google credential

{
"credential": "google-id-token"
}

The operation completed successfully.

Media typeapplication/json
object
token
required

Short-lived access token used in the Authorization header.

string
refresh
required

Long-lived token used to request a new access token.

string
Examples
ExampleIssuedTokens

Issued tokens

{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMSJ9.example-signature",
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiI1NTBlODQwMC1lMjliLTQxZDQtYTcxNi00NDY2NTU0NDAwMDEifQ.example-signature"
}

The request is malformed or violates a business rule.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExampleValidationError

Validation error

{
"non_field_errors": [
"The request could not be processed."
],
"translation": "errors.request.invalid"
}