Skip to content

Go to Google to sign in, or to link a Google account.

GET
/v1/google/start
curl --request GET \
--url 'https://example.com/api/user/v1/google/start?link=1'

Redirects to Google’s consent page, keeping the round trip’s state, nonce and PKCE verifier in a 10-minute HttpOnly cookie. With link=1 the signed-in user links the Google account instead, which needs the user:write scope.

next
string
<= 2048 characters

Where the web app goes after signing in; kept only when it is a path on the web app.

link
string
Allowed values: 1

Link the Google account to the signed-in user.

state

A random value the browser keeps and the link carries back as state, so that browser can tell the link is its own and use it at once. The web app asks before using any other link, which may be someone else’s (login CSRF). Anything that doesn’t match is dropped.

string
<= 64 characters /^[A-Za-z0-9_-]*$/

The browser’s value, carried back on the sign-in link as with a mailed one.

Go there.

Location
required
string format: uri-reference

The request is malformed.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail

Written for the user.

string
instance
string
request_id
string
errors

What is wrong with each field of the request.

object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}

No access token, or one that is invalid or expired.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail

Written for the user.

string
instance
string
request_id
string
errors

What is wrong with each field of the request.

object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}
WWW-Authenticate
required
string
Allowed value: Bearer

The token isn’t a user’s, lacks the scope, or the request came from another origin.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail

Written for the user.

string
instance
string
request_id
string
errors

What is wrong with each field of the request.

object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}

Google sign-in isn’t set up on this server.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail

Written for the user.

string
instance
string
request_id
string
errors

What is wrong with each field of the request.

object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}

Something failed on the server; the request ID leads to the log line.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail

Written for the user.

string
instance
string
request_id
string
errors

What is wrong with each field of the request.

object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}