1003.API Login & Token Instructions
Access to the API interface does not use the traditional username/password login mechanism. Instead, requests must include the username and a token parameter. This token is dynamically generated through a specific algorithm based on the username, password, and specific request parameters (the password is not included in the request itself).,
Example: VIN Decoding API
- http://api.17vin.com:8080/?vin=LFMGJE720DS070251&user=testuser&token=b0f27b65980b01e45a81908b936aa30f
The URL structure can be divided into four components: url_prefix, url_parameters, user, and token.
For example:
- url_prefix = http://api.17vin.com:8080
- url_parameters = /?vin=LFMGJE720DS070251
- user = testuser
- token = b0f27b65980b01e45a81908b936aa30f
The general format is:
- http://api.17vin.com:8080/?para1={para1}¶2={para2}...&user={username}&token={token}
Key Components
url_prefix (fixed): http://api.17vin.com:8080
user (fixed): Your API username.
url_parameters (dynamic): Varies based on the request type:
- API:3001: /?vin=LFMGJE720DS070251
- API:5101: /toyota?action=cata1&vin=LFMGJE720DS070251
- API:5102: /toyota?action=cata2&vin=LFMGJE720DS070251&cata1_code=1
- API:5105: /toyota?action=part&vin=LFMGJE720DS070251&last_cata_code=0901_090562C-0001&last_cata_code_level=2
- API:5106: /?action=search_part_number&vin=LFMGJE720DS070251&query_match_type=exact&query_part_number=091140G010
Token Generation Algorithm,The token is dynamically generated using the following logic:
- token = MD5(MD5(username) + MD5(password) + url_parameters),
Example: username='myusername', password='mypassword', url_parameters='/?vin=LFMGJE720DS070251':
token = MD5(MD5('myusername') + MD5('mypassword') + '/?vin=LFMGJE720DS070251')
This results in the token: 92882f5ad20cf8f3330e970af12b4214
MySQL Implementation:
SELECT MD5(CONCAT(MD5('myusername'), MD5('mypassword'), '/?vin=LFMGJE720DS070251'));
Important Notes:
POST Requests: Even for POST methods, parameters must first be formatted as a GET-style 'url_parameters' string before generating the token.
Token Uniqueness: Each unique request requires a new token calculation. If 'url_parameters' changes, the token must be regenerated.,
Final URL Example:
http://api.17vin.com:8080/?vin=LFMGJE720DS070251&user=myusername&token=92882f5ad20cf8f3330e970af12b4214
(Note: This URL is illustrative and cannot be accessed directly.)