MLE error Token Validation 9210 even if the server has sysdate & (sysdate -2min)

awwa
New Contributor

MLE error Token Validation 9210 even if the server has sysdate & (sysdate -2min)

Hi, I get this error on my test server when I try to test the RESOLVEVADS api even though the server date is at sysdate & (sysdate -2min)

Here is the X-Correlation-Id of the failed request :FDTLakVmjU_SC
Whereas locally it works fine, I don't have any problems.
And for your information, the api is based on two-way ssl authentication.
By the same token, can I have some examples of valid values for these fields so that I can run my tests properly?

directoryName,
excludedDirectoryName,
excludedDirectoryName

I'm really counting on your help asap

4 REPLIES 4
awwa
New Contributor

Re: MLE error Token Validation 9210 even if the server has sysdate & (sysdate -2min)

ResolveVADSAlias*
awwa
New Contributor

Re: MLE error Token Validation 9210 even if the server has sysdate & (sysdate -2min)

The api I'm trying to use is called ResolveAlias
SyedSa
Community Moderator

Re: MLE error Token Validation 9210 even if the server has sysdate & (sysdate -2min)

Hi @awwa, Thank you for reaching out. An agent will get back to you as soon as possible. Until then, if any community member has information that may be helpful, please reply to this thread.

API_Products
Visa Developer Support Specialist

Re: MLE error Token Validation 9210 even if the server has sysdate & (sysdate -2min)

Hey @awwa,

 

You can visit the Visa Developer Error Codes page for cause and resolution.

 

When dealing with the `ResolveAlias` API and encountering issues like the one you're describing, there are a few steps and checks you can perform to troubleshoot and ensure proper functionality.

 

Troubleshooting Steps:

1. Check Server Time Synchronization:
Ensure that your test server's system time is synchronized with a reliable time source. Any significant time drift can cause SSL/TLS issues.

2. Review SSL/TLS Configuration:
Since the API uses two-way SSL authentication, ensure that:
- The client certificate is correctly installed on the server.
- The server certificate is correctly installed and trusted on the client side.
- Both certificates are not expired.

3. Verify X-Correlation-Id:
Use the `X-Correlation-Id` (FDTLakVmjU_SC) provided to check Visa’s logs or contact Visa support for more detailed error information.

4. Check Network Configurations:
Ensure there are no network issues or firewalls blocking the requests.

 

Example Values for API Fields:

Here are example values for the fields you mentioned to help with your tests:

- directoryName:
```json
"directoryName": "VisaDirectory"
```
This field typically refers to a specific directory service that the API interacts with.

- excludedDirectoryName:
```json
"excludedDirectoryName": "MastercardDirectory"
```
This field is used to exclude specific directories from the search or resolution process.

 

Example Request Body:

Below is an example of a sample JSON request body for the `ResolveAlias` API:

```json
{
"alias": "john.doe@example.com",
"directoryName": "VisaDirectory",
"excludedDirectoryName": "MastercardDirectory"
}
```

Java Example using RestTemplate:

 

Here’s how you might set up a request in Java:

```java
//
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class ResolveAliasController {

@PostMapping("/resolveAlias")
public ResponseEntity<String> resolveAlias() {
String apiUrl = "https://sandbox.api.visa.com/resolveAlias";
RestTemplate restTemplate = new RestTemplate();

HttpHeaders headers = new HttpHeaders();
headers.set("X-App-Id", "your-app-id-here");
headers.set("Authorization", "Basic your-base64-encoded-credentials-here");
headers.set("Content-Type", "application/json");

String requestBody = "{ \"alias\": \"john.doe@example.com\", \"directoryName\": \"VisaDirectory\", \"excludedDirectoryName\": \"MastercardDirectory\" }";

HttpEntity<String> entity = new HttpEntity<>(requestBody, headers);

try {
ResponseEntity<String> response = restTemplate.exchange(apiUrl, HttpMethod.POST, entity, String.class);
return response;
} catch (Exception e) {
e.printStackTrace();
return ResponseEntity.status(500).body("Error occurred while calling Visa API");
}
}
}
//
```

 

By following these steps and using the provided examples, you should be able to troubleshoot the issue more effectively.

 




Thanks,

Diana



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.