openapi: 3.0.0 info: version: 2015-07-09 x-release: v4 title: APIs.io Engineering Platform Amazon API Gateway 2014 11 13 Oauth-Authorizations API description: Amazon API Gateway

Amazon API Gateway helps developers deliver robust, secure, and scalable mobile and web application back ends. API Gateway allows developers to securely connect mobile and web applications to APIs that run on AWS Lambda, Amazon EC2, or other publicly addressable web services that are hosted outside of AWS.

x-logo: url: https://api.apis.guru/v2/cache/logo/https_twitter.com_awscloud_profile_image.png backgroundColor: '#FFFFFF' termsOfService: https://aws.amazon.com/service-terms/ contact: name: Mike Ralphson email: mike.ralphson@gmail.com url: https://github.com/mermade/aws2openapi x-twitter: PermittedSoc license: name: Apache 2.0 License url: http://www.apache.org/licenses/ x-providerName: amazonaws.com x-serviceName: apigateway x-origin: - contentType: application/json url: https://raw.githubusercontent.com/aws/aws-sdk-js/master/apis/apigateway-2015-07-09.normal.json converter: url: https://github.com/mermade/aws2openapi version: 1.0.0 x-apisguru-driver: external x-apiClientRegistration: url: https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?nc2=h_ct x-apisguru-categories: - cloud x-preferred: true servers: - url: http://apigateway.{region}.amazonaws.com variables: region: description: The AWS region enum: - us-east-1 - us-east-2 - us-west-1 - us-west-2 - us-gov-west-1 - us-gov-east-1 - ca-central-1 - eu-north-1 - eu-west-1 - eu-west-2 - eu-west-3 - eu-central-1 - eu-south-1 - af-south-1 - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-southeast-1 - ap-southeast-2 - ap-east-1 - ap-south-1 - sa-east-1 - me-south-1 default: us-east-1 description: The Amazon API Gateway multi-region endpoint - url: https://apigateway.{region}.amazonaws.com variables: region: description: The AWS region enum: - us-east-1 - us-east-2 - us-west-1 - us-west-2 - us-gov-west-1 - us-gov-east-1 - ca-central-1 - eu-north-1 - eu-west-1 - eu-west-2 - eu-west-3 - eu-central-1 - eu-south-1 - af-south-1 - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-southeast-1 - ap-southeast-2 - ap-east-1 - ap-south-1 - sa-east-1 - me-south-1 default: us-east-1 description: The Amazon API Gateway multi-region endpoint - url: http://apigateway.{region}.amazonaws.com.cn variables: region: description: The AWS region enum: - cn-north-1 - cn-northwest-1 default: cn-north-1 description: The Amazon API Gateway endpoint for China (Beijing) and China (Ningxia) - url: https://apigateway.{region}.amazonaws.com.cn variables: region: description: The AWS region enum: - cn-north-1 - cn-northwest-1 default: cn-north-1 description: The Amazon API Gateway endpoint for China (Beijing) and China (Ningxia) security: - hmac: [] tags: - name: Oauth-Authorizations description: OAuth Authorizations API paths: /applications/grants: get: summary: APIs.io Engineering Platform List your grants description: '**Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`.' tags: - Oauth-Authorizations operationId: oauth-authorizations/list-grants externalDocs: description: API method documentation url: https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#list-your-grants parameters: - $ref: '#/components/parameters/per-page' - $ref: '#/components/parameters/page' - name: client_id in: query required: false description: The client ID of your GitHub app. schema: type: string responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/application-grant' examples: default: $ref: '#/components/examples/application-grant-items' headers: Link: $ref: '#/components/headers/link' '304': $ref: '#/components/responses/not_modified' '403': $ref: '#/components/responses/forbidden' '401': $ref: '#/components/responses/requires_authentication' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: false removalDate: '2020-11-13' deprecationDate: '2020-02-14' category: oauth-authorizations subcategory: oauth-authorizations deprecated: true /applications/grants/{grant_id}: get: summary: APIs.io Engineering Platform Get a single grant description: '**Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).' tags: - Oauth-Authorizations operationId: oauth-authorizations/get-grant externalDocs: description: API method documentation url: https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#get-a-single-grant parameters: - $ref: '#/components/parameters/grant-id' responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/application-grant' examples: default: $ref: '#/components/examples/application-grant' '304': $ref: '#/components/responses/not_modified' '403': $ref: '#/components/responses/forbidden' '401': $ref: '#/components/responses/requires_authentication' x-github: githubCloudOnly: false enabledForGitHubApps: false removalDate: '2020-11-13' deprecationDate: '2020-02-14' category: oauth-authorizations subcategory: oauth-authorizations deprecated: true delete: summary: APIs.io Engineering Platform Delete a grant description: '**Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). Deleting an OAuth application''s grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).' tags: - Oauth-Authorizations operationId: oauth-authorizations/delete-grant externalDocs: description: API method documentation url: https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#delete-a-grant parameters: - $ref: '#/components/parameters/grant-id' responses: '204': description: Response '304': $ref: '#/components/responses/not_modified' '403': $ref: '#/components/responses/forbidden' '401': $ref: '#/components/responses/requires_authentication' x-github: githubCloudOnly: false enabledForGitHubApps: false removalDate: '2020-11-13' deprecationDate: '2020-02-14' category: oauth-authorizations subcategory: oauth-authorizations deprecated: true /authorizations: get: summary: APIs.io Engineering Platform List your authorizations description: '**Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).' tags: - Oauth-Authorizations operationId: oauth-authorizations/list-authorizations externalDocs: description: API method documentation url: https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#list-your-authorizations parameters: - $ref: '#/components/parameters/per-page' - $ref: '#/components/parameters/page' - name: client_id in: query required: false description: The client ID of your GitHub app. schema: type: string responses: '200': description: Response content: application/json: schema: type: array items: $ref: '#/components/schemas/authorization' examples: default: $ref: '#/components/examples/authorization-items' headers: Link: $ref: '#/components/headers/link' '304': $ref: '#/components/responses/not_modified' '403': $ref: '#/components/responses/forbidden' '401': $ref: '#/components/responses/requires_authentication' '404': $ref: '#/components/responses/not_found' x-github: githubCloudOnly: false enabledForGitHubApps: false removalDate: '2020-11-13' deprecationDate: '2020-02-14' category: oauth-authorizations subcategory: oauth-authorizations deprecated: true post: summary: APIs.io Engineering Platform Create a new authorization description: '**Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.9/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). Creates OAuth tokens using [Basic Authentication](https://docs.github.com/enterprise-server@3.9/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.9/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app''s client ID and secret, found on your OAuth application''s settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. You can also create tokens on GitHub Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/enterprise-server@3.9/articles/creating-an-access-token-for-command-line-use). Organizations that enforce SAML SSO require personal access tokens to be allowed. For more information, see "[About identity and access management with SAML single sign-on](https://docs.github.com/enterprise-server@3.9/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on)" in the GitHub Enterprise Cloud documentation.' tags: - Oauth-Authorizations operationId: oauth-authorizations/create-authorization externalDocs: description: API method documentation url: https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#create-a-new-authorization parameters: [] requestBody: required: false content: application/json: schema: type: object properties: scopes: description: A list of scopes that this authorization is in. type: array items: type: string example: - public_repo - user nullable: true note: description: A note to remind you what the OAuth token is for. type: string example: Update all gems note_url: description: A URL to remind you what app the OAuth token is for. type: string client_id: description: The OAuth app client key for which to create the token. maxLength: 20 type: string client_secret: description: The OAuth app client secret for which to create the token. maxLength: 40 type: string fingerprint: description: A unique string to distinguish an authorization from others created for the same client ID and user. type: string examples: default: summary: Create an authorization value: scopes: - public_repo note: optional note note_url: http://optional/note/url client_id: abcde12345fghij67890 client_secret: 3ef4ad510c59ad37bac6bb4f80047fb3aee3cc7f responses: '201': description: Response content: application/json: schema: $ref: '#/components/schemas/authorization' examples: default: $ref: '#/components/examples/authorization' headers: Location: example: https://api.github.com/authorizations/1 schema: type: string '422': $ref: '#/components/responses/validation_failed' '410': $ref: '#/components/responses/gone' '304': $ref: '#/components/responses/not_modified' '403': $ref: '#/components/responses/forbidden' '401': $ref: '#/components/responses/requires_authentication' x-github: githubCloudOnly: false enabledForGitHubApps: false removalDate: '2020-11-13' deprecationDate: '2020-02-14' category: oauth-authorizations subcategory: oauth-authorizations deprecated: true /authorizations/clients/{client_id}: put: summary: APIs.io Engineering Platform Get-or-create an authorization for a specific app description: '**Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.9/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn''t already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user''s existing authorization for the application if one is present. Otherwise, it creates and returns a new one. If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.9/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).' tags: - Oauth-Authorizations operationId: oauth-authorizations/get-or-create-authorization-for-app externalDocs: description: API method documentation url: https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app parameters: - $ref: '#/components/parameters/oauth-client-id' requestBody: required: true content: application/json: schema: properties: client_secret: description: The OAuth app client secret for which to create the token. maxLength: 40 type: string scopes: description: A list of scopes that this authorization is in. type: array items: type: string example: - public_repo - user nullable: true note: description: A note to remind you what the OAuth token is for. type: string example: Update all gems note_url: description: A URL to remind you what app the OAuth token is for. type: string fingerprint: description: A unique string to distinguish an authorization from others created for the same client ID and user. type: string required: - client_secret type: object examples: default: summary: Create an authorization for an app value: client_secret: 3ef4ad510c59ad37bac6bb4f80047fb3aee3cc7f scopes: - public_repo note: optional note note_url: http://optional/note/url responses: '200': description: if returning an existing token content: application/json: schema: $ref: '#/components/schemas/authorization' examples: response-if-returning-an-existing-token: $ref: '#/components/examples/authorization-response-if-returning-an-existing-token-2' headers: Location: example: https://api.github.com/authorizations/1 schema: type: string '201': description: '**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).' content: application/json: schema: $ref: '#/components/schemas/authorization' examples: default: $ref: '#/components/examples/authorization' headers: Location: example: https://api.github.com/authorizations/1 schema: type: string '422': $ref: '#/components/responses/validation_failed' '304': $ref: '#/components/responses/not_modified' '403': $ref: '#/components/responses/forbidden' '401': $ref: '#/components/responses/requires_authentication' x-github: githubCloudOnly: false enabledForGitHubApps: false removalDate: '2020-11-13' deprecationDate: '2020-02-14' category: oauth-authorizations subcategory: oauth-authorizations deprecated: true /authorizations/clients/{client_id}/{fingerprint}: put: summary: APIs.io Engineering Platform Get-or-create an authorization for a specific app and fingerprint description: '**Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.9/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user''s existing authorization for the application if one is present. Otherwise, it creates and returns a new one. If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.9/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."' tags: - Oauth-Authorizations operationId: oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint externalDocs: description: API method documentation url: https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app-and-fingerprint parameters: - $ref: '#/components/parameters/oauth-client-id' - name: fingerprint in: path required: true schema: type: string requestBody: required: true content: application/json: schema: properties: client_secret: description: The OAuth app client secret for which to create the token. maxLength: 40 type: string scopes: description: A list of scopes that this authorization is in. type: array items: type: string example: - public_repo - user nullable: true note: description: A note to remind you what the OAuth token is for. type: string example: Update all gems note_url: description: A URL to remind you what app the OAuth token is for. type: string required: - client_secret type: object examples: default: summary: Create an authorization for an app and fingerprint value: client_secret: 3ef4ad510c59ad37bac6bb4f80047fb3aee3cc7f scopes: - public_repo note: optional note note_url: http://optional/note/url responses: '200': description: if returning an existing token content: application/json: schema: $ref: '#/components/schemas/authorization' examples: response-if-returning-an-existing-token: $ref: '#/components/examples/authorization-response-if-returning-an-existing-token' headers: Location: example: https://api.github.com/authorizations/1 schema: type: string '201': description: Response if returning a new token content: application/json: schema: $ref: '#/components/schemas/authorization' examples: default: $ref: '#/components/examples/authorization-3' headers: Location: example: https://api.github.com/authorizations/1 schema: type: string '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: false removalDate: '2020-11-13' deprecationDate: '2020-02-14' category: oauth-authorizations subcategory: oauth-authorizations deprecated: true /authorizations/{authorization_id}: get: summary: APIs.io Engineering Platform Get a single authorization description: '**Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).' tags: - Oauth-Authorizations operationId: oauth-authorizations/get-authorization externalDocs: description: API method documentation url: https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#get-a-single-authorization parameters: - $ref: '#/components/parameters/authorization-id' responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/authorization' examples: default: $ref: '#/components/examples/authorization-2' '304': $ref: '#/components/responses/not_modified' '403': $ref: '#/components/responses/forbidden' '401': $ref: '#/components/responses/requires_authentication' x-github: githubCloudOnly: false enabledForGitHubApps: false removalDate: '2020-11-13' deprecationDate: '2020-02-14' category: oauth-authorizations subcategory: oauth-authorizations deprecated: true patch: summary: APIs.io Engineering Platform Update an existing authorization description: '**Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.9/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." You can only send one of these scope keys at a time.' tags: - Oauth-Authorizations operationId: oauth-authorizations/update-authorization externalDocs: description: API method documentation url: https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#update-an-existing-authorization parameters: - $ref: '#/components/parameters/authorization-id' requestBody: required: false content: application/json: schema: type: object properties: scopes: description: A list of scopes that this authorization is in. type: array items: type: string example: - public_repo - user nullable: true add_scopes: description: A list of scopes to add to this authorization. type: array items: type: string remove_scopes: description: A list of scopes to remove from this authorization. type: array items: type: string note: description: A note to remind you what the OAuth token is for. type: string example: Update all gems note_url: description: A URL to remind you what app the OAuth token is for. type: string fingerprint: description: A unique string to distinguish an authorization from others created for the same client ID and user. type: string examples: default: summary: Example of updating scopes and note value: add_scopes: - public_repo remove_scopes: - user note: optional note responses: '200': description: Response content: application/json: schema: $ref: '#/components/schemas/authorization' examples: default: $ref: '#/components/examples/authorization-2' '422': $ref: '#/components/responses/validation_failed' x-github: githubCloudOnly: false enabledForGitHubApps: false removalDate: '2020-11-13' deprecationDate: '2020-02-14' category: oauth-authorizations subcategory: oauth-authorizations deprecated: true delete: summary: APIs.io Engineering Platform Delete an authorization description: '**Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).' tags: - Oauth-Authorizations operationId: oauth-authorizations/delete-authorization externalDocs: description: API method documentation url: https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#delete-an-authorization parameters: - $ref: '#/components/parameters/authorization-id' responses: '204': description: Response '304': $ref: '#/components/responses/not_modified' '403': $ref: '#/components/responses/forbidden' '401': $ref: '#/components/responses/requires_authentication' x-github: githubCloudOnly: false enabledForGitHubApps: false removalDate: '2020-11-13' deprecationDate: '2020-02-14' category: oauth-authorizations subcategory: oauth-authorizations deprecated: true components: schemas: nullable-simple-user: title: Simple User description: A GitHub user. type: object properties: name: nullable: true type: string email: nullable: true type: string login: type: string example: octocat id: type: integer format: int64 example: 1 node_id: type: string example: MDQ6VXNlcjE= avatar_url: type: string format: uri example: https://github.com/images/error/octocat_happy.gif gravatar_id: type: string example: 41d064eb2195891e12d0413f63227ea7 nullable: true url: type: string format: uri example: https://api.github.com/users/octocat html_url: type: string format: uri example: https://github.com/octocat followers_url: type: string format: uri example: https://api.github.com/users/octocat/followers following_url: type: string example: https://api.github.com/users/octocat/following{/other_user} gists_url: type: string example: https://api.github.com/users/octocat/gists{/gist_id} starred_url: type: string example: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: type: string format: uri example: https://api.github.com/users/octocat/subscriptions organizations_url: type: string format: uri example: https://api.github.com/users/octocat/orgs repos_url: type: string format: uri example: https://api.github.com/users/octocat/repos events_url: type: string example: https://api.github.com/users/octocat/events{/privacy} received_events_url: type: string format: uri example: https://api.github.com/users/octocat/received_events type: type: string example: User site_admin: type: boolean starred_at: type: string example: '"2020-07-09T00:17:55Z"' required: - avatar_url - events_url - followers_url - following_url - gists_url - gravatar_id - html_url - id - node_id - login - organizations_url - received_events_url - repos_url - site_admin - starred_url - subscriptions_url - type - url nullable: true basic-error: title: Basic Error description: Basic Error type: object properties: message: type: string documentation_url: type: string url: type: string status: type: string validation-error: title: Validation Error description: Validation Error type: object required: - message - documentation_url properties: message: type: string documentation_url: type: string errors: type: array items: type: object required: - code properties: resource: type: string field: type: string message: type: string code: type: string index: type: integer value: oneOf: - type: string nullable: true - type: integer nullable: true - type: array nullable: true items: type: string nullable-scoped-installation: title: Scoped Installation type: object properties: permissions: $ref: '#/components/schemas/app-permissions' repository_selection: description: Describe whether all repositories have been selected or there's a selection involved type: string enum: - all - selected single_file_name: type: string example: config.yaml nullable: true has_multiple_single_files: type: boolean example: true single_file_paths: type: array items: type: string example: - config.yml - .github/issue_TEMPLATE.md repositories_url: type: string format: uri example: https://api.github.com/users/octocat/repos account: $ref: '#/components/schemas/simple-user' required: - permissions - repository_selection - single_file_name - repositories_url - account nullable: true app-permissions: title: App Permissions type: object description: The permissions granted to the user access token. properties: actions: type: string description: The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. enum: - read - write administration: type: string description: The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. enum: - read - write checks: type: string description: The level of permission to grant the access token for checks on code. enum: - read - write codespaces: type: string description: The level of permission to grant the access token to create, edit, delete, and list Codespaces. enum: - read - write contents: type: string description: The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. enum: - read - write dependabot_secrets: type: string description: The leve of permission to grant the access token to manage Dependabot secrets. enum: - read - write deployments: type: string description: The level of permission to grant the access token for deployments and deployment statuses. enum: - read - write environments: type: string description: The level of permission to grant the access token for managing repository environments. enum: - read - write issues: type: string description: The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. enum: - read - write metadata: type: string description: The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. enum: - read - write packages: type: string description: The level of permission to grant the access token for packages published to GitHub Packages. enum: - read - write pages: type: string description: The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. enum: - read - write pull_requests: type: string description: The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. enum: - read - write repository_hooks: type: string description: The level of permission to grant the access token to manage the post-receive hooks for a repository. enum: - read - write repository_projects: type: string description: The level of permission to grant the access token to manage repository projects, columns, and cards. enum: - read - write - admin secret_scanning_alerts: type: string description: The level of permission to grant the access token to view and manage secret scanning alerts. enum: - read - write secrets: type: string description: The level of permission to grant the access token to manage repository secrets. enum: - read - write security_events: type: string description: The level of permission to grant the access token to view and manage security events like code scanning alerts. enum: - read - write single_file: type: string description: The level of permission to grant the access token to manage just a single file. enum: - read - write statuses: type: string description: The level of permission to grant the access token for commit statuses. enum: - read - write vulnerability_alerts: type: string description: The level of permission to grant the access token to manage Dependabot alerts. enum: - read - write workflows: type: string description: The level of permission to grant the access token to update GitHub Actions workflow files. enum: - write members: type: string description: The level of permission to grant the access token for organization teams and members. enum: - read - write organization_administration: type: string description: The level of permission to grant the access token to manage access to an organization. enum: - read - write organization_custom_roles: type: string description: The level of permission to grant the access token for custom repository roles management. enum: - read - write organization_copilot_seat_management: type: string description: The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in beta and is subject to change. enum: - write organization_announcement_banners: type: string description: The level of permission to grant the access token to view and manage announcement banners for an organization. enum: - read - write organization_events: type: string description: The level of permission to grant the access token to view events triggered by an activity in an organization. enum: - read organization_hooks: type: string description: The level of permission to grant the access token to manage the post-receive hooks for an organization. enum: - read - write organization_personal_access_tokens: type: string description: The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization. enum: - read - write organization_personal_access_token_requests: type: string description: The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization. enum: - read - write organization_plan: type: string description: The level of permission to grant the access token for viewing an organization's plan. enum: - read organization_projects: type: string description: The level of permission to grant the access token to manage organization projects and projects beta (where available). enum: - read - write - admin organization_packages: type: string description: The level of permission to grant the access token for organization packages published to GitHub Packages. enum: - read - write organization_secrets: type: string description: The level of permission to grant the access token to manage organization secrets. enum: - read - write organization_self_hosted_runners: type: string description: The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. enum: - read - write organization_user_blocking: type: string description: The level of permission to grant the access token to view and manage users blocked by the organization. enum: - read - write team_discussions: type: string description: The level of permission to grant the access token to manage team discussions and related comments. enum: - read - write email_addresses: type: string description: The level of permission to grant the access token to manage the email addresses belonging to a user. enum: - read - write followers: type: string description: The level of permission to grant the access token to manage the followers belonging to a user. enum: - read - write git_ssh_keys: type: string description: The level of permission to grant the access token to manage git SSH keys. enum: - read - write gpg_keys: type: string description: The level of permission to grant the access token to view and manage GPG keys belonging to a user. enum: - read - write interaction_limits: type: string description: The level of permission to grant the access token to view and manage interaction limits on a repository. enum: - read - write profile: type: string description: The level of permission to grant the access token to manage the profile settings belonging to a user. enum: - write starring: type: string description: The level of permission to grant the access token to list and manage repositories a user is starring. enum: - read - write example: contents: read issues: read deployments: write single_file: read simple-user: title: Simple User description: A GitHub user. type: object properties: name: nullable: true type: string email: nullable: true type: string login: type: string example: octocat id: type: integer format: int64 example: 1 node_id: type: string example: MDQ6VXNlcjE= avatar_url: type: string format: uri example: https://github.com/images/error/octocat_happy.gif gravatar_id: type: string example: 41d064eb2195891e12d0413f63227ea7 nullable: true url: type: string format: uri example: https://api.github.com/users/octocat html_url: type: string format: uri example: https://github.com/octocat followers_url: type: string format: uri example: https://api.github.com/users/octocat/followers following_url: type: string example: https://api.github.com/users/octocat/following{/other_user} gists_url: type: string example: https://api.github.com/users/octocat/gists{/gist_id} starred_url: type: string example: https://api.github.com/users/octocat/starred{/owner}{/repo} subscriptions_url: type: string format: uri example: https://api.github.com/users/octocat/subscriptions organizations_url: type: string format: uri example: https://api.github.com/users/octocat/orgs repos_url: type: string format: uri example: https://api.github.com/users/octocat/repos events_url: type: string example: https://api.github.com/users/octocat/events{/privacy} received_events_url: type: string format: uri example: https://api.github.com/users/octocat/received_events type: type: string example: User site_admin: type: boolean starred_at: type: string example: '"2020-07-09T00:17:55Z"' required: - avatar_url - events_url - followers_url - following_url - gists_url - gravatar_id - html_url - id - node_id - login - organizations_url - received_events_url - repos_url - site_admin - starred_url - subscriptions_url - type - url authorization: title: Authorization description: The authorization for an OAuth app, GitHub App, or a Personal Access Token. type: object properties: id: type: integer format: int64 url: type: string format: uri scopes: description: A list of scopes that this authorization is in. type: array items: type: string nullable: true token: type: string token_last_eight: type: string nullable: true hashed_token: type: string nullable: true app: type: object properties: client_id: type: string name: type: string url: type: string format: uri required: - client_id - name - url note: type: string nullable: true note_url: type: string format: uri nullable: true updated_at: type: string format: date-time created_at: type: string format: date-time fingerprint: type: string nullable: true user: $ref: '#/components/schemas/nullable-simple-user' installation: $ref: '#/components/schemas/nullable-scoped-installation' expires_at: type: string format: date-time nullable: true required: - app - id - note - note_url - scopes - token - hashed_token - token_last_eight - fingerprint - url - created_at - updated_at - expires_at application-grant: title: Application Grant description: The authorization associated with an OAuth Access. type: object properties: id: type: integer format: int64 example: 1 url: type: string format: uri example: https://api.github.com/applications/grants/1 app: type: object properties: client_id: type: string name: type: string url: type: string format: uri required: - client_id - name - url created_at: type: string format: date-time example: '2011-09-06T17:26:27Z' updated_at: type: string format: date-time example: '2011-09-06T20:39:23Z' scopes: type: array items: type: string example: - public_repo user: $ref: '#/components/schemas/nullable-simple-user' required: - app - id - scopes - url - created_at - updated_at responses: forbidden: description: Forbidden content: application/json: schema: $ref: '#/components/schemas/basic-error' not_found: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/basic-error' requires_authentication: description: Requires authentication content: application/json: schema: $ref: '#/components/schemas/basic-error' gone: description: Gone content: application/json: schema: $ref: '#/components/schemas/basic-error' not_modified: description: Not modified validation_failed: description: Validation failed, or the endpoint has been spammed. content: application/json: schema: $ref: '#/components/schemas/validation-error' examples: authorization-response-if-returning-an-existing-token: value: id: 1 url: https://api.github.com/authorizations/1 scopes: - public_repo token: ghu_16C7e42F292c6912E7710c838347Ae178B4a token_last_eight: Ae178B4a hashed_token: 25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8 app: url: http://my-github-app.com name: my github app client_id: abcde12345fghij67890 note: optional note note_url: http://optional/note/url updated_at: '2011-09-06T20:39:23Z' created_at: '2011-09-06T17:26:27Z' expires_at: '2011-10-06T17:26:27Z' fingerprint: jklmnop12345678 application-grant: value: id: 1 url: https://api.github.com/applications/grants/1 app: url: http://my-github-app.com name: my github app client_id: abcde12345fghij67890 created_at: '2011-09-06T17:26:27Z' updated_at: '2011-09-06T20:39:23Z' scopes: - public_repo authorization-3: value: id: 1 url: https://api.github.com/authorizations/1 scopes: - public_repo token: ghu_16C7e42F292c6912E7710c838347Ae178B4a token_last_eight: Ae178B4a hashed_token: 25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8 app: url: http://my-github-app.com name: my github app client_id: abcde12345fghij67890 note: optional note note_url: http://optional/note/url updated_at: '2011-09-06T20:39:23Z' created_at: '2011-09-06T17:26:27Z' expires_at: '2012-10-06T17:26:27Z' fingerprint: jklmnop12345678 authorization: value: id: 1 url: https://api.github.com/authorizations/1 scopes: - public_repo token: ghu_16C7e42F292c6912E7710c838347Ae178B4a token_last_eight: Ae178B4a hashed_token: 25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8 app: url: http://my-github-app.com name: my github app client_id: abcde12345fghij67890 note: optional note note_url: http://optional/note/url updated_at: '2011-09-06T20:39:23Z' created_at: '2011-09-06T17:26:27Z' expires_at: '2011-10-06T17:26:27Z' fingerprint: jklmnop12345678 authorization-items: value: - id: 2 url: https://enterprise.octocat.com/api/v3/authorizations/2 app: name: My personal access token url: https://docs.github.com/enterprise/rest/enterprise-admin/users#list-personal-access-tokens client_id: '00000000000000000000' token: ghp_16C7e42F292c6912E7710c838347Ae178B4a hashed_token: 23cffb2fab1b0a62747863eba88cb9327e561f2f7a0c8661c0d9b83146cb8d45 token_last_eight: Ae178B4a note: My personal access token note_url: null created_at: '2019-04-24T21:49:02Z' updated_at: '2019-04-24T21:49:02Z' scopes: - admin:business - admin:gpg_key - admin:org - admin:org_hook - admin:pre_receive_hook - admin:public_key - admin:repo_hook - delete_repo - gist - notifications - repo - user - write:discussion fingerprint: null application-grant-items: value: - id: 1 url: https://api.github.com/applications/grants/1 app: url: http://my-github-app.com name: my github app client_id: abcde12345fghij67890 created_at: '2011-09-06T17:26:27Z' updated_at: '2011-09-06T20:39:23Z' scopes: - public_repo authorization-2: value: id: 1 url: https://api.github.com/authorizations/1 scopes: - public_repo token: ghu_16C7e42F292c6912E7710c838347Ae178B4a token_last_eight: Ae178B4a hashed_token: 25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8 app: url: http://my-github-app.com name: my github app client_id: abcde12345fghij67890 note: optional note note_url: http://optional/note/url updated_at: '2011-09-06T20:39:23Z' created_at: '2011-09-06T17:26:27Z' expires_at: '2011-10-06T17:26:27Z' fingerprint: jklmnop12345678 authorization-response-if-returning-an-existing-token-2: value: id: 1 url: https://api.github.com/authorizations/1 scopes: - public_repo token: ghu_16C7e42F292c6912E7710c838347Ae178B4a token_last_eight: Ae178B4a hashed_token: 25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8 app: url: http://my-github-app.com name: my github app client_id: abcde12345fghij67890 note: optional note note_url: http://optional/note/url updated_at: '2011-09-06T20:39:23Z' created_at: '2011-09-06T17:26:27Z' expires_at: '2011-10-06T17:26:27Z' fingerprint: '' headers: link: example: ; rel="next", ; rel="last" schema: type: string parameters: authorization-id: name: authorization_id description: The unique identifier of the authorization. in: path required: true schema: type: integer per-page: name: per_page description: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query schema: type: integer default: 30 oauth-client-id: name: client_id in: path required: true description: The client ID of the OAuth app. schema: type: string examples: default: value: abcde12345fghij67890 page: name: page description: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)." in: query schema: type: integer default: 1 grant-id: name: grant_id description: The unique identifier of the grant. in: path required: true schema: type: integer securitySchemes: hmac: type: apiKey name: Authorization in: header description: Amazon Signature authorization v4 x-amazon-apigateway-authtype: awsSigv4 externalDocs: description: Amazon Web Services documentation url: https://docs.aws.amazon.com/apigateway/ x-hasEquivalentPaths: true