Authentication failures are a common issue when integrating with the Autovit.ro API. Below are the key steps to identify and resolve them:
1. Verify Credentials
The most frequent cause is incorrect login credentials. Make sure the username and password are correct by logging into the Autovit.ro account directly using the same details.
2. Check with the Dealer (for CRMs)
In some cases, dealers update their login credentials without informing their CRM provider. If authentication suddenly fails, the CRM should confirm the credentials with the dealer and update them accordingly.
3. Validate the Endpoint and Request
Ensure that the authentication request is sent to the correct endpoint:
https://www.autovit.ro/api/open/oauth/token
Also, verify that all required parameters are included as specified in the API documentation:
https://www.autovit.ro/api/doc/#api-Oauth2-PostToken
| Field | Type | Description |
|---|---|---|
| client_id | Number | Unique API client ID |
| client_secret | String | Client secret code |
| grant_type | String | Allowed grant type: "password" |
| username | String | Only for "password" grant type - user login (email) |
| password | String | Only for "password" grant type - user password |
4. Confirm Successful Response
If the request is correct, the API will return a response similar to the following:
{
"access_token": "b3f8ddf191d982aba05c44e137fe9ea3a7c61126",
"token_type": "bearer",
"expires_in": 43200,
"refresh_token": "16555f1d5f6ee9366c4c2788588bc987ef0aa7af",
"scope": "read write"
}