---
title: "Revoke OAuth Token"
method: POST
path: "/v1/oauth/revokeByToken"
tags: ["OAuth"]
---

# Revoke OAuth Token

`POST /v1/oauth/revokeByToken`

## Request

- Base URL: `https://api.gemini.com`
- URL: `https://api.gemini.com/v1/oauth/revokeByToken`
- Auth: API key in header `X-GEMINI-APIKEY` and API key in header `X-GEMINI-SIGNATURE` and API key in header `X-GEMINI-PAYLOAD`

The `access_token` may be revoked at any time by using `v1/oauth/revokeByToken`. Once a token is revoked or expires, it can no longer be used to make requests.

This endpoint is only available using an `access_token` and will revoke the token used to make the request.

## Headers

- `X-GEMINI-APIKEY` string, required
- `X-GEMINI-SIGNATURE` string, required
- `X-GEMINI-PAYLOAD` string, required
- `Content-Type` string
- `Content-Length` string
- `Cache-Control` string

## Request body

- object
  - `request` string, required: The literal string "/v1/oauth/revokeByToken"

## Response `200`

An object that indicates the access_token has been revoked.

- object
  - `message` string: A message that indicates the token has been revoked for the account

## Other responses

- `400`: Bad request - malformed request or invalid parameters
- `401`: Unauthorized - missing or invalid authentication
- `403`: ApiKey fails IP Filtering Check
- `404`: Resource not found
- `429`: Too many requests - you have exceeded the rate limit
- `500`: Internal server error

---

[API](https://skmtc.dev/gemini/apis/rest-api.md) - [All operations](https://skmtc.dev/gemini/apis/rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gemini/apis/rest-api/revisions/24979792d748?raw)
