Skip to main content

Authentication

The myfood24 API uses API Keys for authentication.

Authorization is required in all API requests and is added as a HTTP header:

Authorization: Api-Key API_KEY_PROVIDED

Sample request with the Authorization header

curl -X GET \
/api/1.0/food_databases \
-H 'Authorization: Api-Key API-KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json'

If the request could not be authenticated, the response will be 403 Forbidden with the following payload:

{
"detail": "You do not have permission to perform this action.",
"code": "permission_denied"
}