> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Get OAuth App

> Retrieves an OAuth app by ID or client ID.

Permission required: `manage-oauth-apps`. The endpoint can be accessed even without this permission, but sensitive information (such as client secrets) will be filtered out.

### Changelog
| Version      | Description |
| ---------------- | ------------|
|2.4.0            | Added       |

## OpenAPI

````json GET /api/v1/oauth-apps.get
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Integrations"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "paths": {
    "/api/v1/oauth-apps.get": {
      "get": {
        "tags": [
          "OAuth Apps"
        ],
        "summary": "Get OAuth App",
        "description": "Retrieves an OAuth app by ID or client ID.\n\nPermission required: `manage-oauth-apps`. The endpoint can be accessed even without this permission, but sensitive information (such as client secrets) will be filtered out.\n\n### Changelog\n| Version      | Description |\n| ---------------- | ------------|\n|2.4.0            | Added       |",
        "operationId": "get-api-v1-oauth-apps.get",
        "parameters": [
          {
            "$ref": "#/components/parameters/X-Auth-Token"
          },
          {
            "$ref": "#/components/parameters/X-User-Id"
          },
          {
            "name": "clientId",
            "in": "query",
            "description": "The client ID. This value is required if `_id` is not used.",
            "schema": {
              "type": "string"
            },
            "example": "nkn8jk67b8b99b78"
          },
          {
            "name": "_id",
            "in": "query",
            "description": "The app ID. This value is required if `clientId` is not used.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "oauthApp": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "clientId": {
                          "type": "string"
                        },
                        "clientSecret": {
                          "type": "string"
                        },
                        "redirectUri": {
                          "type": "string"
                        },
                        "_createdAt": {
                          "type": "string"
                        },
                        "_createdBy": {
                          "type": "object",
                          "properties": {
                            "_id": {
                              "type": "string"
                            },
                            "username": {
                              "type": "string"
                            }
                          }
                        },
                        "_updatedAt": {
                          "type": "string"
                        }
                      }
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "oauthApp": {
                        "_id": "zapier",
                        "name": "Zapier",
                        "active": "true",
                        "clientId": "zapier",
                        "clientSecret": "RTK6TlndaCIolhQhZ7_KHIGOKj41RnlaOq_o-7JKwLr",
                        "redirectUri": "https://zapier.com/dashboard/auth/oauth/return/RocketChatDevAPI/",
                        "_createdAt": "2019-10-17T22:55:32.787Z",
                        "_createdBy": {
                          "_id": "system",
                          "username": "system"
                        },
                        "_updatedAt": "2019-10-17T22:55:32.787Z"
                      },
                      "success": "true"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/authorizationError"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "errorType": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "success": "false",
                      "error": "must have required property '_id'\n must have required property 'clientId'\n must have required property 'appId'\n must match exactly one schema in oneOf [invalid-params]",
                      "errorType": "invalid-params"
                    }
                  },
                  "Example 2": {
                    "value": {
                      "success": "false",
                      "error": "OAuth app not found."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "X-Auth-Token": {
        "name": "X-Auth-Token",
        "in": "header",
        "description": "The authorization token of the user.",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "9HqLlyZOugD_0YdwAJF8V47U3QHXSq"
      },
      "X-User-Id": {
        "name": "X-User-Id",
        "in": "header",
        "description": "The user ID of the user.",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "aobEdbYhXfu5hkeqG"
      }
    },
    "responses": {
      "authorizationError": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Authorization Error": {
                "value": {
                  "status": "error",
                  "message": "You must be logged in to do this."
                }
              }
            }
          }
        }
      }
    }
  }
}
````

