These docs are for v2.0. Click to read the latest docs for v3.

Authentication

Credit API uses Global Identity Manager (https://gim.readme.io) as Authentication provider.

Acessing a API throught a client

To request your authentication tokens please send an email to [email protected]

📘

The request must have a Authorization header in the following format

GIM id="${clientApplicationKey}", mac="${base64sha256}", ts="${timestamp}"

Where:

"${clientApplicationKey}" is the client key given from GIM
"${base64sha256}" a string encrypted with HMAC256 alghoritm. More about this below
"${timestamp}" the current date/time as unix timestamp

📘

The string used to generate the ${base64sha256} parameter must be:

gim.${clientApplicationKey}.${method}.${urlWithoutQueryString}.${timestamp}

Where:

${method} http method from request
${urlWithoutQueryString} url from request whithout querystring
${timestamp} the timestamp used to compose the authorization header

📘

Request exemple using curl

curl -H "Authorization: GIM id="895bf9d4-a786-4584-9cc5", mac="NWJiZGMwM2ZjNWU4NzQ0MDUxZGU4NTlmYmNlOGE4NGI1ZjQ3MDM3NDYyMDkzNWY", ts="1528909305"" http:/myapi.com/api/v1