Skip to content
Get Started

Google

client.token.google(TokenGoogleParams { email } body, RequestOptionsoptions?): TokenGoogleResponse { access_token }
post/v3/connections/google-docs/token

Get a valid Google access token for a connected Google account. Automatically refreshes the token if expired.

ParametersExpand Collapse
body: TokenGoogleParams { email }
email: string

The Google account email

ReturnsExpand Collapse
TokenGoogleResponse { access_token }
access_token: string

A valid Google access token

Google
import ValTown from "npm:@valtown/sdk";

const client = new ValTown();

const response = await client.token.google({ email: 'email' });

console.log(response.access_token);
{
  "access_token": "access_token"
}
Returns Examples
{
  "access_token": "access_token"
}