Go to Google to sign in, or to link a Google account.
const url = 'https://example.com/api/user/v1/google/start?link=1';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Where the web app goes after signing in; kept only when it is a path on the web app.
Link the Google account to the signed-in user.
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.
The browser’s value, carried back on the sign-in link as with a mailed one.
Responses
Section titled “Responses”Go there.
Headers
Section titled “Headers”The request is malformed.
An RFC 9457 problem.
object
Written for the user.
What is wrong with each field of the request.
object
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.
An RFC 9457 problem.
object
Written for the user.
What is wrong with each field of the request.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}Headers
Section titled “Headers”The token isn’t a user’s, lacks the scope, or the request came from another origin.
An RFC 9457 problem.
object
Written for the user.
What is wrong with each field of the request.
object
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.
An RFC 9457 problem.
object
Written for the user.
What is wrong with each field of the request.
object
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.
An RFC 9457 problem.
object
Written for the user.
What is wrong with each field of the request.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}