Sign in with a Google ID token
POST
/v1/auth/google
const url = 'https://api.wirevod.online/v1/auth/google';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"id_token":"eyJhbGciOiJSUzI1NiJ9.google-id-token"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.wirevod.online/v1/auth/google \ --header 'Content-Type: application/json' \ --data '{ "id_token": "eyJhbGciOiJSUzI1NiJ9.google-id-token" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
id_token
required
string
Example
{ "id_token": "eyJhbGciOiJSUzI1NiJ9.google-id-token"}Responses
Section titled “ Responses ”Existing Google identity linked and signed in.
Media typeapplication/json
object
user
required
object
id
required
string
tenant_id
required
string
email
required
string format: email
email_verified
required
boolean
name
required
string | null
role
required
string
created_at
required
integer
access_token
required
string
refresh_token
required
string
token_type
required
string
expires_in
required
integer
created
required
boolean
Example
{ "user": { "id": "usr_01J9Z", "tenant_id": "ten_01J9Z", "email": "owner@example.com", "email_verified": true, "name": "Ada Lovelace", "role": "owner", "created_at": 1760000000000 }, "access_token": "eyJhbGciOiJIUzI1NiJ9.access", "refresh_token": "wvr_9f2c.refresh", "token_type": "bearer", "expires_in": 900, "created": false}New account created for the Google identity.
Media typeapplication/json
object
user
required
object
id
required
string
tenant_id
required
string
email
required
string format: email
email_verified
required
boolean
name
required
string | null
role
required
string
created_at
required
integer
access_token
required
string
refresh_token
required
string
token_type
required
string
expires_in
required
integer
created
required
boolean
Example
{ "user": { "id": "usr_01J9Z", "tenant_id": "ten_01J9Z", "email": "owner@example.com", "email_verified": true, "name": null, "role": "owner", "created_at": 1760000000000 }, "access_token": "eyJhbGciOiJIUzI1NiJ9.access", "refresh_token": "wvr_9f2c.refresh", "token_type": "bearer", "expires_in": 900, "created": true}The request was malformed or failed validation.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "invalid_request", "code": "invalid_request", "message": "asset_id is required"}Missing or invalid credentials.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "unauthorized", "code": "unauthorized", "message": "Authentication required"}The request conflicts with the resource’s current state.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "upload_in_progress", "code": "upload_in_progress", "message": "An upload is already in progress for this asset"}Too many requests in the current window.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "rate_limited", "code": "rate_limited", "message": "Too many requests", "details": { "retry_after": 60 }}Headers
Section titled “Headers”Retry-After
integer
Seconds to wait before retrying.
A dependency (DRM, Google, playback signing) is not configured or unavailable.
Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{ "error": "playback_unavailable", "code": "playback_unavailable", "message": "Playback is not configured"}