Skip to content
  • Auto
  • Light
  • Dark

Generate URL

Get Oauth2 URL
agents.evaluation_metrics.oauth2.generate_url(Oauth2GenerateURLParams**kwargs) -> Oauth2GenerateURLResponse
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
redirect_url: Optional[str]

The redirect url.

type: Optional[str]

Type "google" / "dropbox".

ReturnsExpand Collapse
class Oauth2GenerateURLResponse:

The url for the oauth2 flow

url: Optional[str]

The oauth2 url

Get Oauth2 URL
from gradient import Gradient

client = Gradient()
response = client.agents.evaluation_metrics.oauth2.generate_url()
print(response.url)
{
  "url": "example string"
}
Returns Examples
{
  "url": "example string"
}