Token Validation Failed "code": "9210",

admin_11
Regular Visitor

Token Validation Failed "code": "9210",

Title: Error 401 (9210) - Token validation failed when calling Visa Card Service API

Hello Visa Developer Community,

I'm encountering an issue while trying to call the Visa Card Service API using Postman with Two-way SSL authentication. I'm receiving the following error:

{
"responseStatus": {
"status": 401,
"code": "9210",
"severity": "ERROR",
"message": "Token validation failed",
"info": ""
}
}

Here are the details of my API call:

- Method: POST
- URL: https://sandbox.api.visa.com/connect/v1/cardServices/new
- SSL: Two-way SSL authentication

Request Headers:
- X-App-Id: [My X-App-Id]
- keyID: 2c2ac2da-386a-4743-b48f-6a98e549636d
- Accept: application/json
- Content-Type: application/json
- Authorization: Basic [My Base64 encoded credentials]

Request Body:
{
"encData": "eyJlbmMiOiJBMTI4R0NNIiwiaWF0IjoxNzI5NDMxNjU5ODk3LCJhbGciOiJSU0EtT0FFUC0yNTYiLCJraWQiOiIyYzJhYzJkYS0zODZhLTQ3NDMtYjQ4Zi02YTk4ZTU0OTYzNmQifQ.ZBgV_etyEB0fTH_Vyl_8hXXE7kboxtuT1CZYSmx0UPGMFvtypJvjdnLjVaPPhm5jOkCCiipFHDmBjGdLo3v06OU7ZXRxnxyrp3Xby_IzbB5PUaARm7Hg0Rns4TmZAx6JxnnLvEG9I89f0S0AAR5rIUxWqCAyWCocw5BtVEIxknekOEQMCG1EMh8NoVQXGNuHmlX0WG4jV_ijeKDy4hPJlGQx-6WMnD2apuN5dZIrnN5vw6s3YeYSpIW1USTgDZJFzTuxJzNix5F9g_um8v_vvOkIyLiQ_qoAAgo1HMfNRBwVeQTGC9IggMimcd9FQHiKRI0HznL4RMeB8UKhX2nzRw.5yVn_QaYSYst6BYE.VRdeCxDWRMwSQcDGKcI_buMjO8umL_bJvfQCN0O4RtXc47Jpg2etGA2IPOp_n4OhBY7dmgdIiu06Hws_WQ96AkXbSL6Y_nS7cF0eDsw1pMbAQxxJ10VXfh0MgzLyW3F5MZjsqUC-hF8cb0Grk9qfgSke1WuQWUtNcRt6TZLNAwzFRPUeGU8CDm9JpizLm3gaN5b39kH70bXH46phzbGLE_syisDuswtitFnWR6iBmymw7HBezpSpbG2vUJaWqQhnDBhmLut9dyprr7de2Wsskj0WttWeYv27EK5mHTkCtbx_inBJXCqWxhIDnxzmM1JfNatKEFm-GqQ.eITqlaLP-p4vgUaLl_J-OQ"
}

Response Body:

{
"responseStatus": {
"status": 401,
"code": "9210",
"severity": "ERROR",
"message": "Token validation failed",
"info": ""
}

I've already tried the following:
1. Double-checked my API credentials
2. Verified my SSL certificate is valid and properly configured in Postman
3. Confirmed I'm using the correct sandbox API endpoint

Can anyone provide guidance on how to resolve this token validation error? Are there any specific troubleshooting steps I should take for error code 9210?

Thank you in advance for your help!

1 REPLY 1
DianaVisaPM
Visa Developer Support Specialist

Re: Token Validation Failed "code": "9210",

Hey @admin_11,

 

Here are the possible solutions and troubleshooting steps:

  1. Check the Certificate Chain: Ensure that the entire certificate chain is properly configured and that the root and intermediate certificates are included in the SSL setup.

  2. Verify the KeyID: Make sure that the keyID in your request headers matches the key associated with your certificate.

  3. Ensure Correct Encoding: Double-check that your Base64 encoded credentials in the Authorization header are correctly encoded. It should be in the format Base64Encode(username:password).

  4. Check encData Formatting: Ensure that the encData is correctly formatted and encrypted as expected by the API.

  5. API Key and App ID: Verify that your X-App-Id and other API keys are correct and are not expired or revoked.

  6. Postman Configuration:

    • In Postman, ensure that the client certificate is correctly configured under the "Settings" -> "Certificates" section.
    • Ensure that Two-way SSL is properly set up and that both the client certificate and private key are correctly added.
  7. Sandbox Environment: Confirm that you are using the right endpoint for the sandbox environment, which you seem to have already done.




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.