HMAC Signature
Generate HMAC signature for consumer_id using your API key as the secret for secure authentication.
Endpoint
/hmacSignature
https://search-api.atriai.chat/hmacSignature
Authentication
Request Parameters
The request body should contain a JSON object with the following parameters:
Request Body Parameters
The consumer identifier to generate an HMAC signature for
Validation Rules
The following validation rules apply to the request:
consumer_id is required
The consumer_id parameter must be provided and cannot be empty
Valid API key required
A valid API key must be provided in the Authorization header as it serves as the HMAC secret
Response Schema
The API returns a JSON object with the following structure:
The consumer identifier that was signed
The generated HMAC-SHA256 signature in hexadecimal format
Usage Examples
Common usage patterns for the HMAC Signature endpoint:
Generate HMAC for Consumer
Generate a secure signature for consumer authentication
{ "consumer_id": "user_12345" }
Response Example
Example response for a successful HMAC signature generation:
{ "consumer_id": "user_12345", "hmac_signature": "a8b2c3d4e5f6789012345abcdef67890123456789abcdef0123456789abcdef01" }
Security Notes
Important security considerations when using HMAC signatures:
- The API key serves as both authentication and HMAC secret
- HMAC signatures provide cryptographic proof of message integrity and are used to verify consumer authenticity
- Keep your API key secure and do not expose them in client side code as it's used to generate signatures
Try it out
Select a language to see how to make a request to the API
curl -L 'https://search-api.atriai.chat/hmacSignature' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_BEARER_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "consumer_id": "user-12345-session-67890" }'
Token Required
Replace YOUR_API_KEY
with your actual token to authenticate requests.