Important: Treat your API keys like passwords. Never commit them to version control or expose them in client-side code.
API keys follow a specific format for easy identification:
sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sk_
- Identifies this as a secret keyxxxxxxx...
- Unique 64-character identifierInclude your API key in the X-API-Key
header of every request:
curl -X GET https://stockalert.pro/api/public/v1/alerts \
-H "X-API-Key: sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
const response = await fetch('https://stockalert.pro/api/public/v1/alerts', {
headers: {
'X-API-Key': 'sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'Content-Type': 'application/json'
}
});
const data = await response.json();