# Auth

To obtain a JWT token for accessing AUTH endpoints, users should follow a two-step process. First, they need to submit their public signer address and account addres to the endpoint by making a GET request to `/sign/request_sign_data?user=<signer_account|starknet_account>account=<starknet_account>`.&#x20;

After receiving the message to sign, users must sign the following typed message with their private key.

The second step involves submitting the signed message to the endpoint `/sign/auth` using a POST request. In the request data, users should provide a JSON object containing the message (msg) as an integer and the signature (r and s) as a list of integers. The structure of the JSON data should be as follows:

&#x20;`{'msg': <msg integer>, 'signature': [<r integer>, <s integer>]}`.

It's important to note that the HTTP status code for both steps is always 200, indicating successful communication and processing of the request.

In Python, one can use `message_signature` from the **starknet\_py** library to sign the message to obtain a signature. For reference please check [SDK](/layerakira-documentation/integration/sdk.md) section.


---

# 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://layer-akira.gitbook.io/layerakira-documentation/integration/endpoints/auth.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.
