> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/integrations-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/integrations-portal/openapply/public-rest-apis/v3/authentication.md).

# Authentication

The following endpoint provides the Oauth2 client credentials flow

## Get Bearer Token

> Exchange the credentials (client ID and client secret) for a bearer token.\
> Find these details in OpenApply's API Manager.\
> \
> The token carries the \`public\` scope and is valid for 24 hours. \`public\`\
> grants the admissions API: it expands per request to \`admissions:read\`,\
> plus \`admissions:write\` when the credential is not marked read-only. A\
> read-only credential is refused on writes.\
> \
> The school must have the public API enabled; token requests are refused\
> while it is switched off.<br>

```json
{"openapi":"3.0.1","info":{"title":"openapply","version":"3.0.0"},"tags":[{"name":"Authentication","description":"The following endpoint provides the Oauth2 client credentials flow"}],"servers":[{"url":"https://api.openapply.com","description":"CAN region auth server"},{"url":"https://api.openapply.cn","description":"CN region auth server"}],"security":[{"oauth2Auth":[],"oauth2AuthCN":[]}],"components":{"securitySchemes":{"oauth2Auth":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.openapply.com/oauth/token","scopes":{"public":"Grants the admissions API. Expands per request to admissions:read, plus admissions:write when the credential is not read-only."}}}}}},"paths":{"/oauth/token":{"post":{"summary":"Get Bearer Token","tags":["Authentication"],"operationId":"getBearerToken","description":"Exchange the credentials (client ID and client secret) for a bearer token.\nFind these details in OpenApply's API Manager.\n\nThe token carries the `public` scope and is valid for 24 hours. `public`\ngrants the admissions API: it expands per request to `admissions:read`,\nplus `admissions:write` when the credential is not marked read-only. A\nread-only credential is refused on writes.\n\nThe school must have the public API enabled; token requests are refused\nwhile it is switched off.\n","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"type":"integer"},"scope":{"type":"string"}},"required":["access_token","token_type","expires_in","scope"]}}}},"400":{"description":"Bad Request - Missing or invalid parameters"},"401":{"description":"Unauthorized - Invalid client credentials"}},"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"string"}}},"required":true}}}}}
```
