Snyk OAuth2 API - Authorize

The user-facing half of Snyk's RFC 6749 OAuth2 flow for Snyk Apps. Served from the Snyk app subdomain rather than the API subdomain, it initiates the authorization-code grant and redirects back to the client with a code. Snyk publishes this as its own OpenAPI 3.0.3 document.

Operations 1

GET /oauth2/authorize Initiate the authorization code flow

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/oauth2-authorize"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

snyk-oauth2-app-openapi.yml Raw ↑
---
openapi: 3.0.3
info:
  title: Snyk OAuth2 API
  version: 1.0.0
servers:
  - url: https://app.snyk.io
    description: Snyk UI
tags:
  - name: oauth2
    description: oauth2
x-hideTryItPanel: true
x-codeSamples: true
paths:
  /oauth2/authorize:
    get:
      summary: Initiate the authorization code flow
      description:
        To be called by the end user to authorize the client application
        to their Snyk organizations. Success returns a redirect to the provided `redirect_uri`,
        containing an authorization code which can be exchanged for an access token.
      tags: [oauth2]
      parameters:
        - name: response_type
          in: query
          description:
            The type of authorization flow being used. Only "code" is supported
            for authorization code flow.
          required: true
          schema:
            type: string
            enum: [code]
            example: code
        - name: client_id
          in: query
          description: The client ID of the client application.
          required: true
          schema:
            type: string
            example: 64ae3415-5ccd-49e5-91f0-9101a6793ec2
        - name: redirect_uri
          in: query
          description:
            The redirection URI to which the authorization server will
            redirect the user after granting or denying authorization. Must match
            one of the URIs set on the client application exactly.
          required: true
          schema:
            type: string
            example: https://example.com/callback
        - name: state
          in: query
          description:
            An opaque value used by the client to maintain state between
            the authorization request and the authorization callback. Use this value
            to match client callbacks to the request that spawned them.
          required: false
          schema:
            type: string
            example: random_state_value
        - name: code_challenge
          in: query
          description:
            A cryptographically secure code challenge derived from a secret
            code verifier you generate on the client-side as defined in [RFC7636].
            It is generated from a hashing a randomly generated string, the `code_verifier`
            used when exchanging tokens, then URL safe base 64 encoding the result.
          required: true
          schema:
            type: string
            example: YWVjMDcwNjQ1ZmU1M2VlM2IzNzYzMDU5Mzc2MTM0ZjA1OGNjMzM3MjQ3Yzk3OGFkZDE3OGI2Y2NkZmIwMDE5Zg
        - name: code_challenge_method
          in: query
          description:
            The method used to derive the code challenge from the code
            verifier, only S256 is supported.
          required: true
          schema:
            type: string
            enum: [S256]
            example: S256
      responses:
        "303":
          description:
            Redirection to authorization server. The Location header is
            set to the provided `redirect_uri` so the user's browser should follow
            this redirect automatically.
          headers:
            Location:
              description:
                "Specified redirect_uri with querystring parameters `code`
                and `state`, or if there is an error: `error`, `error_description`
                and `state`. See examples for more details."
              schema:
                type: string
              required: true
              examples:
                success:
                  value: https://example.com/callback?code=returned_auth_code&state=random_state_value
                  description:
                    Authorization succeeded, the returned code can be used
                    to call /oauth2/token to obtain an access token.
                error:
                  value: https://example.com/callback?error=invalid_token&error_description=Token%20expired.&state=random_state_value
                  description:
                    "There was an error. Inform the user that the flow
                    did not complete successfully. A full list of possible errors
                    can be found in the OAuth Extensions Error Registry registry maintained
                    by IANA: https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml"