# Authentication

The Paymagic Automate API requires an API Key to access any of the endpoints. In the future, we may add additional methods of authentication and authorization like [OAuth](https://oauth.net/) or [signed messages from Ethereum Addresses](https://login.xyz/).

The Paymagic Team will provide customers with an API Key, which must be kept safe and secure. Access to a customer's API Key can result in the loss of funds.

Pass the API Key into the `X-API-KEY` Header for each request:

```javascript
var axios = require('axios');
var data = JSON.stringify({});

var config = {
  headers: { 
    'Content-Type': 'application/json', 
    'X-API-KEY': '<Insert API Key>'
  },
  method: 'post',
  url: 'https://api.paymagic.xyz/v1/rin/account/0x7328285B4435dbc51897DC2d900D21707d14253e/payout/disperse',
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```


---

# 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://docs-v1.paymagic.xyz/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.
