> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/developer-tools/snyk-api/oauth2-api.md).

# OAuth2 API

Snyk provides an OAuth2 API, primarily for use with [Snyk Apps](/developer-tools/snyk-api/using-specific-snyk-apis/snyk-apps-apis.md). It complies with RFC 6749.

Most endpoints are served from the Snyk API subdomain (for example, <https://api.snyk.io>), with the one exception being `/oauth2/authorize` which is served on the main app subdomain (for example, <https://app.snyk.io>).

{% openapi src="/files/fqxBKtJCy00T9Llx8vmK" path="/oauth2/authorize" method="get" %}
[oauth-app-spec.yaml](https://558411700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIEEjSXQQu36y0vmFV8zf%2Fuploads%2Fgit-blob-c5deed075973ba16e5ec51bb7e894d02107164ff%2Foauth-app-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="/files/vLbxFiYT2fYQqAubVzPV" path="/token" method="post" %}
[oauth-api-spec.yaml](https://558411700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIEEjSXQQu36y0vmFV8zf%2Fuploads%2Fgit-blob-688a641e25b6bd8b33a94ac151f6adba5ecd370f%2Foauth-api-spec.yaml?alt=media)
{% endopenapi %}

{% openapi src="/files/vLbxFiYT2fYQqAubVzPV" path="/revoke" method="post" %}
[oauth-api-spec.yaml](https://558411700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIEEjSXQQu36y0vmFV8zf%2Fuploads%2Fgit-blob-688a641e25b6bd8b33a94ac151f6adba5ecd370f%2Foauth-api-spec.yaml?alt=media)
{% endopenapi %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snyk.io/developer-tools/snyk-api/oauth2-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
