> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# automation-get-token-oauth

> Returns the OAuth token to be used in future requests to Itential using client_id and client_secret.

## Purpose

This automation **returns the OAuth token** to be used in future requests to Itential. Retrieves the client\_id and client\_secret from the Itential Platform Instances Config Table.

### authentication-get-token-oauth

API used:

```
/oauth/token
```

### Input

| Inputs         | Data Type         | Sample Input       | Description                         |
| -------------- | ----------------- | ------------------ | ----------------------------------- |
| instance\_name | Dropdown (String) | SE Lab Prod 2023.1 | The Itential Platform instance name |

### Output

| Output | Data Type | Sample Output                        | Description              |
| ------ | --------- | ------------------------------------ | ------------------------ |
| token  | String    | 9f0999c2-7054-4820-8eeb-c3052d30acaa | The authentication token |

### Error Output

| Error Output   | Data Type | Sample Output       | Description   |
| -------------- | --------- | ------------------- | ------------- |
| error\_message | String    | Invalid credentials | Error message |