API keys
Use API keys to authenticate API requests.
BanQ authenticates your API requests using your service's API keys.
If a request doesn't include a signature, BanQ returns an URL signature error.
If a request includes an invalid signature, BanQ returns a header signature error.
You can create API keys with the following instruction
RSA-2048 key pair
Create key pair
Create RSA-2048 key pair for your service.
Usage
Type | File | When to use |
---|---|---|
Private | pk/gen.private.key | On the server side: Use this key to authenticate your API request. Don't expose this key. |
Public | pk/gen.public.pem | Provide this key for other service to verify API request (signed with the private key). Can be publicly accessible. |
Authenticate API request
Using Shell Command
Generate signature of the message with your key
Fill base64 encoded signature in request header as
X-Signature
Using JavaScript
Verify API request
base64 decode the signature from request header
Verify signature
Last updated