WD API
Authentication
Generate the auth hash for WD API requests.
Each client receives a Client ID and API key from Impel. Contact support@impel.ai if you haven't received your credentials.
Your Client ID and API key are unique secret credentials. Impel uses them to monitor API usage and protect its applications from unauthorized usage. Store these credentials in an encrypted secrets store such as AWS Secrets Manager or comparable.
Generating the authentication hash
- Concatenate the API key, the Client ID (
cidparameter) and the Vehicle ID (vinparameter), in that order. - Compute the SHA512 hex digest.
- Include the result as the
authparameter in the request URL.
Reference code, in Python:
#!/usr/bin/env python
import hashlib
API_KEY = 'your_api_key'
cid = 'your_client_id'
vin = 'vehicle_identifier'
string_to_hash = API_KEY + cid + vin
auth = hashlib.sha512(string_to_hash.encode()).hexdigest()
request_url = f'https://wa-detection-api.spincar.com?auth={auth}&cid={cid}&vin={vin}'