API Token Generation
Access Server Settings
Navigate to your server’s settings page in the Melonly dashboard.
Open Panel Section
Click on “Panel” in the server settings navigation.
Locate API Tokens
Scroll down to the “Server API Tokens” section.
Create New Token
Click the token creation button
Enter a descriptive name for identification
Set an appropriate expiry date for your use case
Generate the token
Secure Your Token
Copy immediately: The token is only displayed once and cannot be retrieved after this step.
Copy and store your API token in a secure location.
Verify Integration
Test your newly created token with a server information request:
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://api.melonly.xyz/api/v1/server/info
const response = await fetch ( 'https://api.melonly.xyz/api/v1/server/info' , {
headers: {
'Authorization' : 'Bearer YOUR_API_TOKEN'
}
});
const data = await response . json ();
console . log ( data );
import requests
headers = {
'Authorization' : 'Bearer YOUR_API_TOKEN'
}
response = requests.get( 'https://api.melonly.xyz/api/v1/server/info' , headers = headers)
data = response.json()
print (data)
Expected Response
{
"id" : "server_12345" ,
"name" : "Your Server Name" ,
"discordGuildId" : "987654321098765432" ,
"ownerId" : "owner_67890" ,
"createdAt" : 1640995200 ,
"joinCode" : "ABC123"
}
Security Considerations
Token Management Best Practices
Rotation : Implement regular token rotation schedules
Scope : Use separate tokens for different applications or environments
Storage : Never commit tokens to version control or expose in client-side code
Monitoring : Track token usage and implement alerting for unusual activity
API tokens inherit the permissions of the creating user. Ensure your account has the necessary server access levels for your intended API operations.
What’s Next?
Explore Endpoints Browse the complete API reference with detailed schemas and examples.
Implementation Examples View practical integration patterns and common use cases.
Start with read-only endpoints like /server/info and /server/members to familiarize yourself with the API structure before implementing write operations.