Authentication
Authenticate requests to the ERM API using your UniqueToken.
The ERM API uses a token-based authentication scheme. Every request must include your API key in the request headers.
Getting an API Key
- Open the ERM Dashboard and select your server
- Navigate to Integrations → API Keys
- Click Generate Key
- Copy the key — you won't be able to see it again after leaving the page
Store your key securely
API keys are shown only once when generated. If you lose your key, you'll need to revoke it and generate a new one.
Making Authenticated Requests
Include your API key as the UniqueToken header on every request:
GET https://api.ermdev.xyz/v1/guild/shifts
UniqueToken: your-api-key-here
Content-Type: application/jsonExample with curl
curl https://api.ermdev.xyz/v1/guild/shifts \
-H "UniqueToken: your-api-key-here"Example with JavaScript (fetch)
const response = await fetch('https://api.ermdev.xyz/v1/guild/shifts', {
headers: {
'UniqueToken': 'your-api-key-here',
},
});
const data = await response.json();Example with Python (requests)
import requests
response = requests.get(
'https://api.ermdev.xyz/v1/guild/shifts',
headers={'UniqueToken': 'your-api-key-here'},
)
data = response.json()Revoking a Key
If a key is compromised:
- Go to Dashboard → Integrations → API Keys
- Find the key and click Revoke
- Generate a new key and update your integrations
Revoked keys are immediately invalidated.