> For the complete documentation index, see [llms.txt](https://developer.convergegate.com/legacy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.convergegate.com/legacy/wallet-api/introduction/authentication.md).

# Authentication

Authenticate your account by including your secret key in API requests. You can manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such GitHub, client-side code, and so forth.

Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.

If you need to authenticate via bearer auth (e.g., for a cross-origin request), use -H “Authorization: Bearer sk\_test\_BQokikJOvBiI2HlWgH4olfQ2” instead of -u sk\_test\_BQokikJOvBiI2HlWgH4olfQ2:.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

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

```
// curl https://{provided url}/v2/charges \
  -u sk_test_BQokikJOvBiI2HlWgH4olfQ2:

# Curl uses the -u flag to pass basic auth credentials.(Adding a colon after your
# API key prevents curl from asking for a password.) A sample test API key is included
# in all the examples here, so you can test any example right away.
# To test requests using your account, replace the sample API key with your actual API key.
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Reference:** Please refer to the Data Table associated with the specific API Command you are employing. It provides a comprehensive overview of the fields utilized and their respective order for verification.
{% endhint %}

{% content-ref url="/pages/f7JXj0N4nWUjopcgUI4e" %}
[Testing](/legacy/card-server-to-server/overview/testing.md)
{% endcontent-ref %}


---

# 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://developer.convergegate.com/legacy/wallet-api/introduction/authentication.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.
