---
agentTools:
  projectIndex: https://nudgesecurity.readme.io/llms.txt
---

# Get an oauth grant

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "HTTPError": {
        "properties": {
          "detail": {
            "type": "object"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Oauth": {
        "properties": {
          "account_id": {
            "type": "integer"
          },
          "app_external_id": {
            "nullable": true,
            "type": "string"
          },
          "fields": {
            "readOnly": true,
            "type": "array"
          },
          "first_seen": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "insights": {
            "items": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "identifier": {
                  "type": "string"
                },
                "score": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "labels": {
            "readOnly": true,
            "type": "array"
          },
          "last_seen": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "oauth_info": {
            "type": "object"
          },
          "oauth_integration": {
            "nullable": true,
            "type": "boolean"
          },
          "parent_account_id": {
            "type": "integer"
          },
          "risk_level": {
            "nullable": true,
            "type": "string"
          },
          "risk_score": {
            "nullable": true,
            "type": "number"
          },
          "scope_reference_hash": {
            "nullable": true,
            "type": "string"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/OauthScope"
            },
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "user_id": {
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "OauthScope": {
        "properties": {
          "consent_types": {
            "nullable": true
          },
          "scope_reference": {
            "$ref": "#/components/schemas/OauthScopeRef"
          }
        },
        "type": "object"
      },
      "OauthScopeRef": {
        "properties": {
          "app_domain_canonical": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "risk_level": {
            "nullable": true,
            "type": "string"
          },
          "scope_service": {
            "nullable": true,
            "type": "string"
          },
          "scope_type": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "description": "Authorization header containing the Nudge API Token",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "Nudge API",
    "version": "1.0"
  },
  "openapi": "3.0.3",
  "paths": {
    "/api/1.0/oauth/grants/{oauth_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "oauth_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Oauth"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get an oauth grant",
        "tags": [
          "Oauth Grants"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.nudgesecurity.io"
    }
  ],
  "tags": [
    {
      "name": "Oauth Grants"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 101,
      "1": 130,
      "2": 205,
      "3": 225,
      "4": 131,
      "5": 178,
      "6": 81,
      "7": 0,
      "8": 15,
      "9": 104,
      "10": 80,
      "11": 14
    }
  }
}
```