Authentication mechanism
Authentication mechanism
We use Basic Authentication
to grant access to the API.
How it works:
- API access key is a pair:
username (api_key)
: A unique identifier of the API access key.password (api_secret)
: A secret code of API access key.
Computer Vision Vietnam team will create username and password for each customer before integration.
- The client sends a request:
Client sends HTTP requests with Authorization
header containing Basic
followed by a space and a Base64 encoding username:password
.
For example, demo:p@55w0rd
client will send:
Authorization: Basic ZGVtbzpwQDU1dzByZA==
How to charge
When using CVS's service, whether or not to charge is based on the returned errorCode
code. Charges when using the service:
errorCode
= 0: Request successful, chargeerrorCode
: As other value, no charge
Details of the errorCode
types can be found in the error codes table in the returned information section.