Authentication
Authenticate your API requests by including your API key in the request headers.
API key
Include your API key as a Bearer token in the Authorization header:
shell
curl https://api.poyst.com/v1/hello \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Keep your API key safe
Never expose your API key in client-side code or public repositories. Use environment variables to store keys securely.
Environment variables
Store your API key in an environment variable:
shell
export POYST_API_KEY="your_api_key_here"
curl https://api.poyst.com/v1/hello \
-H "Authorization: Bearer $POYST_API_KEY" \
-H "Accept: application/json"