---
title: Obtain access token
description: Once you have obtained your API key, you are able to use it to generate an access token using cURL.
component: egnyte
page_id: egnyte:setup:pf_egnyte_connector_obtain_access_token
canonical_url: https://docs.pingidentity.com/integrations/egnyte/setup/pf_egnyte_connector_obtain_access_token.html
revdate: June 10, 2024
section_ids:
  about-this-task: About this task
  steps: Steps
---

# Obtain access token

## About this task

Once you have obtained your API key, you are able to use it to generate an access token using [cURL](http://curl.haxx.se/docs/manpage.html).

|   |                                                                                                                                                                                                                                                                       |
| - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | After creating your application, Egnyte must approve it before you can use the API key to generate your access token. For more information, see [Frequently Asked Questions](https://developers.egnyte.com/Frequently_Asked_Questions) on the Egnyte developers site. |

## Steps

1. From an application or terminal capable of running cURL commands, run the following cURL command:

   ```shell
   curl -v --request POST -H "Content-Type: application/x-www-form-urlencoded"
   -d grant_type=password -d username=YOUR_USERNAME -d password=YOUR_PASSWORD
   -d client_id=YOUR_API_KEY https://YOUR_SUBDOMAIN.egnyte.com/puboauth/token
   ```

   where:

   * *YOUR\_USERNAME* is the username of an administrative user on the Egnyte subdomain you wish to provision users.

     |   |                                                                                                                                                |
     | - | ---------------------------------------------------------------------------------------------------------------------------------------------- |
     |   | The administrative user for you Egnyte subdomain is not the same account that you used to generate the application on Egnyte's developer site. |

   * *YOUR\_PASSWORD* is the password for the administrative user of your Egnyte subdomain.

   * *YOUR\_API\_KEY* is the API key identified in [Obtain API key](pf_egnyte_connector_obtain_api_key.html).

   * *YOUR\_SUBDOMAIN* is the subdomain portion of the URL used to access your organization's Egnyte. For example, if the URL used to access Egnyte is https\://*myCompany*.egnyte.com/ then the subdomain is *myCompany*.

2. Note the presented access token for later use in [Configure provisioning](pf_egnyte_connector_configure_provisioning.html). ![An image of the cURL command and expected access token results.](_images/sri1563995295504.jpg)
