> For the complete documentation index, see [llms.txt](https://abyss-project.gitbook.io/abyss-monitor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://abyss-project.gitbook.io/abyss-monitor/setup/core.md).

# Core

[How to create an API Key ?](https://abyss-project.gitbook.io/abyss/onboarding/projects-and-applications#create-api-key)

### Using the NPM Core Package

The Core setup will allow you to use the core methods to access the service API.

{% code overflow="wrap" lineNumbers="true" %}

```typescript
AbyssMonitorCore.setConfig({
  // Your Application Monitor API Key
  applicationApiKey: "application-monitor-api-key",
  // Your Application ID
  applicationId: "application-id",
  // Name showed on alerts
  applicationName: 'My Super Application - API',
  // This method should return an URl to post Alert
  // You can return null/undefined if you want to not send alert
  // Please check complete typing of payload on the Core Package
  async getWebhookUrl(payload) {
    return "my-discord-webhook-url";
  },
  // Can be found on your AbyssMonitor dashboard
  // It's required to publish log remotely
  secretPublishToken: "secret-publish-token",
});
// This method will enable automatic retry on failed http request to AbyssMonitor API
AbyssMonitorCore.enableAxiosRetry();
```

{% endcode %}

### Standalone

If you are not using the [NPM package](https://www.npmjs.com/package/@abyss-project/monitor) to access the API, you can skip this step and just set your API key on the HTTP request header.

{% code overflow="wrap" lineNumbers="true" %}

```http
// HTTP Version
GET /api/user/me HTTP/1.1
Host: monitor-api.abyss-project.fr
abyss-monitor-api-key-application: "abyss-monitor-api-key-application"

// Curl Version
curl --location 'https://monitor-api.abyss-project.fr/api/user/me' \
--header 'abyss-monitor-api-key-application: abyss-monitor-api-key-application'
```

{% endcode %}

{% hint style="info" %}
`abyss-monitor-api-key-application:` allow you to access application endpoint
{% endhint %}
