Signing requests
Every endpoint exceptGET /api/ping requires these four headers:
A request with a missing or invalid header returns 401 UNAUTHORIZED.
Selecting a timestamp
CB-ACCESS-TIMESTAMP is the number of seconds since the Unix epoch in UTC. It must be within 5 seconds of the API service time. A timestamp outside that window, or one that is not a number, returns 400 BAD_REQUEST.
Creating a signature
CB-ACCESS-SIGN is an HMAC-SHA256 of the prehash string timestamp + method + requestPath + body (where + is string concatenation), Base64-encoded.
timestampis the exactCB-ACCESS-TIMESTAMPheader value.methodis the HTTP method in upper case, for exampleGETorPOST.requestPathis the path of the endpoint, including the/apior/api/v1prefix. Do not include the host or the query string: query parameters are not signed.bodyis the request body exactly as sent, or an empty string when there is no body (for example, onGET).
CB-ACCESS-SIGN.
Authorization
After the signature is verified, the API key’s user must be active, and the key’s Firm or FCM must be active. Each route then requires a permission or a credential level:
A key that lacks the required permission or credential level gets
403 FORBIDDEN.