> For the complete documentation index, see [llms.txt](https://docs.ledge.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ledge.co/api-reference/fundamentals/authentication.md).

# Authentication

First, to obtain your client ID and generate a client secret, go to the [Developers page](https://app.goledge.io/developers) on the Ledge web application.

To access the Ledge API, you must request an access token when authenticating a user. To request an access token, make a POST call to the token URL.

```
curl --request POST --url '<https://goledge.us.auth0.com/oauth/token>' 
	--header 'content-type: application/x-www-form-urlencoded' 
	--data grant_type=client_credentials 
	--data client_id=YOUR_CLIENT_ID 
	--data client_secret=YOUR_CLIENT_SECRET 
	--data audience=https://goledge.us.auth0.com/api/v2/
```

You receive an `HTTP 200` response with a payload containing `access_token`**,** `token_type`**,** and `expires_in` values:

```json
{
	"access_token":"eyJz93a...k4laUWw",
	"token_type":"Bearer",
	"expires_in":10800
}
```
