# Authentication

### Authentication

The API uses a Bearer token for authentication. To get one, we must first make an call to our authentication endpoint with the credentials we get from the Journeys system `Client ID` and a `Client Secret.`

When requesting a token, we use a JSON body to authenticate.

\
The endpoint to use is:

```
https://journeys-api.50skills.app/v1/auth/token/
```

{% tabs %}
{% tab title="Example request" %}

```json
{
  "client_id": "8s236ed66a5233443783ff7ffb0d91",
  "client_secret": "167632e0971219af444cab35d11858ac18ad9f70",
  "token_type:": "Bearer"
}  
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Example response" %}

```json
{
  "expires_in": 35999,
  "access_token": "b8a281906f575c63c79a1d25b72b54ef3a2ecfa0",
  "token_type": "Bearer"
}    
```

{% endtab %}
{% endtabs %}

### Using the token

After receiving the Token, you are ready to start using the public endpoints available.

Authorization type we use is ***Bearer*** where the Token generated earlier is used along with the Prefix **Bearer**

<div data-full-width="false"><figure><img src="/files/SwwlBTglgjZS4pcTUdCM" alt=""><figcaption><p>Example using Insomnia</p></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.50skills.app/journeys/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
