# Authentication

{% hint style="warning" %}
You must include your **Bearer token** in the request header.
{% endhint %}

## GET /api/v1/auth

> Returns data about the currently authenticated user

```json
{"openapi":"3.0.0","info":{"title":"GURUPAY API","version":"0.2.0"},"tags":[{"name":"Auth","description":"Authentication related endpoints."}],"servers":[{"url":"https://public-api.gurupay.eu","description":"Production API Server"},{"url":"https://public-api-dev.gurupay.eu","description":"Sandbox API Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","description":"Authentication using a Bearer token.","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"}},"schemas":{"API.Resources.UserResource":{"properties":{"uuid":{"description":"The unique identifier of the user.","type":"string","format":"uuid"},"is_active":{"description":"Indicates if the user is active (0 for inactive, 1 for active).","type":"integer"},"name":{"description":"The full name of the user.","type":"string","maxLength":255},"email":{"description":"The email address of the user.","type":"string","format":"email","maxLength":255},"created_at":{"$ref":"#/components/schemas/Timestamp"},"updated_at":{"$ref":"#/components/schemas/Timestamp"}},"type":"object"},"Timestamp":{"description":"A Unix timestamp in seconds.","type":"integer","format":"int64"},"UnauthenticatedResponse":{"properties":{"status":{"type":"boolean"},"status_code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}},"type":"object"}}},"paths":{"/api/v1/auth":{"get":{"tags":["Auth"],"summary":"Returns data about the currently authenticated user","operationId":"API.Auth","responses":{"200":{"description":"Successfully retrieved User resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API.Resources.UserResource"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}}}}}}}
```


---

# 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://developers.gurupay.eu/api-reference/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.
