> For the complete documentation index, see [llms.txt](https://www.docpartner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.docpartner.dev/en/api/sms-partner/credits.md).

# Credits

## URL

<mark style="color:red;">`GET`</mark> `https://api.smspartner.fr/v1/me`

#### **Required Parameters**

<table><thead><tr><th width="142">Name</th><th>Value</th></tr></thead><tbody><tr><td><code>apiKey</code></td><td><a href="https://my.smspartner.fr/dashboard/api">Your API key</a></td></tr></tbody></table>

#### Optional Parameters

<table><thead><tr><th width="142">Name</th><th>Value</th></tr></thead><tbody><tr><td><code>_format</code></td><td><code>json</code> or <code>xml</code></td></tr></tbody></table>

#### Requests

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

```php
<?php
    // Prepare data for GET request
    $data = 'apiKey=YOUR_API_KEY';

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL,'https://api.smspartner.fr/v1/me?'.$data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_TIMEOUT, 10);

    $result = curl_exec($curl);
    curl_close($curl);

    // Process your response here
    echo $result;
?>
```

{% endtab %}

{% tab title="VB.net" %}

```vbnet
' VB.NET code (same as original, no translation needed)
```

{% endtab %}

{% tab title="Python" %}

```python
# Python code (same as original, no translation needed)
```

{% endtab %}

{% tab title="cURL" %}

```
curl -H "Content-Type: application/json" -X GET  https://api.smspartner.fr/v1/me?apiKey=xxx
```

{% endtab %}

{% tab title="Nodejs" %}

```javascript
// Node.js code (same as original, no translation needed)
```

{% endtab %}

{% tab title="JAVA" %}

```java
// Java code (same as original, no translation needed)
```

{% endtab %}

{% tab title="Swift" %}

```swift
// Swift code (same as original, no translation needed)
```

{% endtab %}

{% tab title="Go" %}

```go
// Go code (same as original, no translation needed)
```

{% endtab %}

{% tab title="C#" %}

```csharp
// C# code (same as original, no translation needed)
```

{% endtab %}
{% endtabs %}

#### **Response**

{% tabs %}
{% tab title="json" %}
{% code fullWidth="true" %}

```json
{
    "success": true,
    "code": 200,
    "user": {
        "username": "exemple@email.com",
        "firstname": "John",
        "lastname": "Doe"
    },
    "credits": {
        "creditSms": 269082,
        "creditSmsECO": 444570,
        "creditHlr": 2045023,
        "toSend": 0,
        "solde": "10225.119",
        "currency": "EUR",
        "balance": "10225.119"
    }
}
```

{% endcode %}
{% endtab %}

{% tab title="xml" %}

```xml
<?xml version='1.0' encoding='UTF-8'?>
<result>
    <entry>true</entry>
    <entry>200</entry>
    <entry>
        <username>exemple@email.com</username>
        <firstname>John</firstname>
        <lastname>Doe</lastname>
    </entry>
    <entry>
        <entry>269070</entry>
        <entry>444551</entry>
        <entry>2044937</entry>
        <entry>0</entry>
        <entry><![CDATA[10224.688]]></entry>
        <entry><![CDATA[EUR]]></entry>
        <entry><![CDATA[10224.688]]></entry>
    </entry>
</result>
```

{% endtab %}
{% endtabs %}

#### **Error Codes**

| Response Code | Message               |
| ------------- | --------------------- |
| 10            | Invalid API key       |
| 200           | Everything went fine! |


---

# 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 dynamically by asking a question.

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

```
GET https://www.docpartner.dev/en/api/sms-partner/credits.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
