Hi
I am trying to invoke Foreign Exchange rate API using privateKey and cert.pem file
However i get error response 401:Authentication Failed.
My code is in nodejs 10.x.
below is the code snippet
uri: "https://sandbox.api.visa.com/forexrates/v1/foreignexchangerates",
key: fs.readFileSync("./privateKey.pem"),
cert: fs.readFileSync("./cert.pem"),
ca: fs.readFileSync('./DigiCertGlobalRootCA.pem'),
agent: false,
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic xyz'
},
body: { "destinationCurrencyCode": currency, "markUpRate": "0", "sourceAmount": "1", "sourceCurrencyCode": baseCurrency },
I have followed below link
https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl
Please assist
Solved! Go to Solution
Hey @APN_Engineering,
I've created case INC9148150 for the engineering team to investigate. We're currently working to resolve your issue and someone will get back to you soon.
Hey @APN_Engineering,
Can you please try again and let us know if the issue is still happening?
Hey @APN_Engineering,
I reached out to you previously and I haven't heard back. Can you please let us know if you're still experiencing an issue?
Hey @APN_Engineering,
I've reached out to you previously but haven't heard back. Feel free to reach out to us if you're interested in working together in the future.
@APN_Engineering wrote:Hi
I am trying to invoke Foreign Exchange rate API using privateKey and cert.pem file
However i get error response 401:Authentication Failed.
My code is in nodejs 10.x.
below is the code snippet Tellpizzahut
uri: "https://sandbox.api.visa.com/forexrates/v1/foreignexchangerates",
key: fs.readFileSync("./privateKey.pem"),
cert: fs.readFileSync("./cert.pem"),
ca: fs.readFileSync('./DigiCertGlobalRootCA.pem'),
agent: false,
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic xyz'
},
body: { "destinationCurrencyCode": currency, "markUpRate": "0", "sourceAmount": "1", "sourceCurrencyCode": baseCurrency },
I have followed below link
https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl
Please assist
Did you ever find a solution for this? I'm in the same situation. Still getting same error message.