Authentication
All APIs take an
access key
and secret key
param in the header. These key-secret pairs are associated with a user and allow permission to the user to request the API.Send a POST request to
https://backend.cloud.nodeflux.io/auth/signatures
, by providing these arguments as application/json
with request payload:{
"access_key": "YOUR_ACCESS_KEY_ID",
"secret_key": "YOUR_SECRET_KEY"
}
you will get a response similar to this:
{
"headers": {
"x-nodeflux-timestamp":"20190111T104645Z"
},
"token": "34c513672bb7c4918d52cea989fba1060f8084ece5135df5155c2dec2d98cff1"
}
After you get the signature response contains
x-nodeflux-timestamp
and token
, you can start to construct your authorization key with this format:NODEFLUX-HMAC-SHA256 Credential={ACCESS_KEY}/{DATE}/nodeflux.api.v1beta1.ImageAnalytic/StreamImageAnalytic, SignedHeaders=x-nodeflux-timestamp, Signature={TOKEN}
Modify
ACCESS_KEY
, DATE
, and TOKEN
from signature response. DATE
is the date component of x-nodeflux-timestamp
or the first 8 characters of DATE
(e.g. 20190111
).You need to pass your authentication as a header each time you make an API request. Below are variables that you need to setup as a header before making a request:
Key | Value |
Content-type | application/json |
Authorization | Your authorization key. |
x-nodeflux-timestamp | x-nodeflux-timestamp from the Signature response. |
Last modified 1yr ago