Skip to content
  • Auto
  • Light
  • Dark

Generate URL

Get Oauth2 URL
client.agents.evaluationMetrics.oauth2.generateURL(Oauth2GenerateURLParams { redirect_url, type } query?, RequestOptionsoptions?): Oauth2GenerateURLResponse { url }
get/v2/gen-ai/oauth2/url

To generate an Oauth2-URL for use with your localhost, send a GET request to /v2/gen-ai/oauth2/url. Pass 'http://localhost:3000 as redirect_url

ParametersExpand Collapse
query: Oauth2GenerateURLParams { redirect_url, type }
redirect_url?: string

The redirect url.

type?: string

Type "google" / "dropbox".

ReturnsExpand Collapse
Oauth2GenerateURLResponse { url }

The url for the oauth2 flow

url?: string

The oauth2 url

Get Oauth2 URL
import Gradient from '@digitalocean/gradient';

const client = new Gradient();

const response = await client.agents.evaluationMetrics.oauth2.generateURL();

console.log(response.url);
{
  "url": "example string"
}
Returns Examples
{
  "url": "example string"
}