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

# Deputy

> Example Javascript code for importing data from Deputy

You can use Import Scripts to import data from your Deputy account directly into an Equals workbook.

# Create a Deputy Access Token

Follow [the instructions here](https://developer.deputy.com/deputy-docs/docs/using-a-permanent-token) to create a Deputy access token.

# Add the key to a secret group

Copy the access token from the prior step. Then [create a new secret group](https://docs.equals.com/docs/secret-groups) and paste the key into a new secret named `deputy_api_key`.

# Example code

Once you've completed the prior steps, create a new workbook, add a new import script to a sheet and copy + paste the script below. Once pasted select your secret group in the toolbar (make sure the key in the secret group is called `deputy_api_key`).

Note that you'll want to change the URL below to reflect your Deputy information. For example, [https://simonssambos.au.deputy.com](https://simonssambos.au.deputy.com/) is an installation called simonssambos and is present in the Australian geographic region. There are four possible regions for a Deputy installation currently:

* AU (Australia)
* EU (Europe)
* UK (United Kingdom)
* US (United States)

More details can be found on the Deputy API page [here](https://developer.deputy.com/deputy-docs/docs/using-a-permanent-token) or by contacting their [API support team](https://developer.deputy.com/).

```
const equals = require("equals");
var axios = require('axios');

const apiKey = equals.getSecret("deputy_api_key");

var config = {
 method: 'get',
 url: 'https://simonsambos.au.deputy.com/api/v1/supervise/employee',
 headers: { 
    'Authorization': 'Bearer ${apiKey}'
  }
};

const response = await axios(config)
equals.addRows(response.data)
```

***

[Auth0](/docs/auth0)

[Github](/docs/github)
