---
title: "Get Oauth2 URL"
method: GET
path: "/v2/gen-ai/oauth2/url"
tags: ["DigitalOcean-public.v2-new_GradientAI Platform"]
---

# Get Oauth2 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

## Query parameters

- `type` string
- `redirect_url` string

## Response `200`

A successful response.

- ApiGenerateOauth2URLOutput — The url for the oauth2 flow
  - `url` string — The oauth2 url

## Other responses

- `401` — Authentication failed due to invalid credentials.
- `404` — The resource was not found.
- `429` — The API rate limit has been exceeded.
- `500` — There was a server error.
- `default` — There was an unexpected error.

---

[API](https://skmtc.net/digitalocean/apis/digitalocean-api.md) · [All operations](https://skmtc.net/digitalocean/apis/digitalocean-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalocean/digitalocean-api/versions/cb3bf9b21459/schema)
