Authentication is handled with a simple API key.
An example of an API key is: 3lsgjMYPph1HBauH1DXErdP5POak0dhb2Mp0S060
You can attach your API key to a request in one of two ways:
We strongly recommend option 2 so that your API key isn't visible to others in logs or request sniffing.
apiKey
GET parameter:curl https://quizapi.io/api/v1/questions -G \
-d apiKey=YOUR_API_KEY \
X-Api-Key
header:curl https://quizapi.io/api/v1/questions \
-H 'X-Api-Key: YOUR_API_KEY'
If you don't append your API key correctly, or your API key is invalid, you will receive a 401 - Unauthorized HTTP error:
{
"error": "Unauthenticated."
}