# User Authorization

As well as application authorization, most routes require user authorization to access things like service, proxy and account details.

User authorization is requested by the API as either a `Authorization` header.

The User JWT authentication token can be obtained by successfully logging in via the route below, which responds as shown.

```
POST /v1.0/private/user/customer/login

JSON-Encoded Response Body

{
    "data": {
        "access_token": "eyJhbGciOiJIVzaCI6ZmFsc2UsImlhdCI6MTY5NTAzMjk1NywianRpIjoiZDk3OWJiNDMtYzA2Mi00M2MzLTg0YTYtYWMxMzc3M2MyNjFiIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6eyJjdXN0b21lcl9pZCI6NiwiY3VzdG9tZXJfZmlyc3RfbmFtZSI6IkpvaG56IiwiY3VzdG9tZXJfbGFzdF9uYW1lIjoiUHJveGllcyIsImN1c3RvbWVyX2VtYWlsX2FkZHJlc3MiOiJ4eHhAcGluZ3Byb3hpZXMuY29tIiwiY3VzdG9tZXJfc2Vzc2lvbl9rZXkiOiJGM2lCMjZXT0VkVnRNcVpMczNoWEN4YjZlMGROSnIwS0V0Qm5SWllJV0JndWNMZ2xWVWw3RE9QU1JRcVNSZDRJODZ5bUpjODNCdnRxTHc4QW5PZzVXRUxQeEFhc09UaTRlV1dIIiwiY3VzdG9tZXJfaXNfYWRtaW4iOnRydWUsImN1c3RvbWVyX2FkbWluX3R5cGUiOiJBTEwiLCJzZXNzaW9uX2NyZWF0aW9uX3RpbWUiOiJNb24sIDE4IFNlcCAyMDIzIDEwOjI5OjE3IEdNVCIsInNlc3Npb25faXBfYWRkcmVzcyI6Ijc4LjMzLjI0LjE3OCJ9LCJuYmYiOjE2OTUwMzI5NTcsImV4cCI6MTcyNjU2ODk1N30.n_TI1IcW-XEEafz_1eNUevavthQXrRclRjMhM-HAvys"
        },
    "message": "Login successful."
}, 200
```

The customer login route may also be protected with Two-Factor Authentication. To pass this 2FA layer please consult:

{% content-ref url="/pages/tfGOb4A8x0rX9dqKJkMW" %}
[Two-Factor Authentication (2FA)](/basic-concepts/two-factor-authentication-2fa.md)
{% endcontent-ref %}

This JWT token must be set as `Authorization` header on every request along with the Application authorization in order for requests to be authenticated.

{% hint style="info" %}
JWT Tokens may expire after a set period dependent on Ping Proxies' current security policies. If a token has expired, requests will repond with 401, Unauthorized and the application should attempt to obtain User Authorization again.
{% endhint %}


---

# 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://internal.developer.documentation.private.user.pingproxies.com/basic-concepts/authorization/user-authorization.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.
