Marfeel API Authentication

All Marfeel API endpoints are authenticated using a bearer HTTP authentication scheme, also called token authentication scheme. The bearer token allowing access to a certain resource or URL is a cryptic string that you generate using a script like a curl command.

A bearer token allows developers to have a more secure point of entry for using the Marfeel APIs, and are one of the core features of OAuth 2.0.

The API client must always send the bearer token in the Authorization header when making requests to protected resources:

Authorization: Bearer <token>

How to generate an API authorization token

You can generate Bearer Tokens via login request using API credentials:

curl --location --request POST '' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "",
    "password": "secret"

Here is what the response would look like. See the token field. Note that this is an example Bearer Token:

   "name":"API User",
   "surname":" ",

On OSX you can copy the bearer token directly to your clipboard using:

curl --location --request POST '' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "",
    "password": "secret"
}' | jq ."token" | pbcopy 
TIP: You can you use jq to pretty print the output of the json or to directly select the token field.
Attention: API access is an Add-on on top of your pricing plan. The API user is provided to you by your account manager. Keep it in a safe place as all the account information is accessible via API.

How to authorize API requests

Once obtained the bearer token will have to be informed in all subsequent API requests with the Authorization header:

curl --location --request POST '' \
--header 'Authorization: Bearer eyJ...t0y20' \

Renew tokens

A valid bearer token keeps the authentication alive without requiring to regenerate it constantly. Marfeel bearer tokens are valid up to 30 minutes after its generation. After this period a new token will need to be generated.