> For the complete documentation index, see [llms.txt](https://developers.gurupay.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.gurupay.eu/getting-started/make-your-first-api-call.md).

# Make Your First API Call

Let’s make a simple call to fetch the currently authenticated user using your API token. This endpoint requires a valid Bearer token and returns information about your API user.

{% hint style="info" %}
📍 Endpoint: `GET /api/v1/auth`\
🛡 Requires Authentication (Bearer token)
{% endhint %}

## Request Headers

| Header          | Required | Example                 |
| --------------- | -------- | ----------------------- |
| `Authorization` | ✅        | `Bearer YOUR_API_TOKEN` |
| `Accept`        | ✅        | `application/json`      |

## Example Code

{% tabs %}
{% tab title="cUrl" %}

```bash
curl -X GET https://public-api-dev.gurupay.eu/api/v1/auth \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
```

{% endtab %}

{% tab title="PHP" %}

```php
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://public-api-dev.gurupay.eu/api/v1/auth', [
    'headers' => [
        'Authorization' => 'Bearer YOUR_API_KEY',
        'Accept'        => 'application/json',
    ]
]);

echo $response->getBody();
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://public-api.gurupay.eu/api/v1/auth", {
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json"
  }
})
  .then(response => response.json())
  .then(data => console.log(data));

```

{% endtab %}

{% tab title=".NET" %}

```csharp
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "YOUR_API_KEY");
        client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

        var response = await client.GetAsync("https://public-api-dev.gurupay.eu/api/v1/auth");
        var content = await response.Content.ReadAsStringAsync();

        Console.WriteLine(content);
    }
}

```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "https://public-api-dev.gurupay.eu/api/v1/auth", nil)
    if err != nil {
        panic(err)
    }

    req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
    req.Header.Add("Accept", "application/json")

    res, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer res.Body.Close()

    body, _ := io.ReadAll(res.Body)
    fmt.Println(string(body))
}

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.gurupay.eu/getting-started/make-your-first-api-call.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
