Find Near by ATMs return 403 error

fridric
New Contributor

Find Near by ATMs return 403 error

Dear Support Team,

 

I am encountering a 403 Forbidden error when making a request to the Totals Inquiry API in the Visa Global ATM Locator (Sandbox Environment). However, I can successfully make requests to the Geocode Inquiry API using the same credentials.

 

I have already verified that the Totals Inquiry API is included in my project settings, and my authentication setup is correct, as two-way SSL is working without any issues. The request method I am using is POST, and the request body follows the API documentation. Additionally, there are no regional restrictions that should prevent access, and other API calls, such as Geocode Inquiry, are functioning properly with the same credentials.

 

Below is the cURL request I am using:

 

curl --location --request POST 'https://sandbox.api.visa.com/globalatmlocator/v3/localatms/atmsinquiry' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic

[REDACTED]

' \
--data '{
"requestData": {
"culture": "en-US",
"options": {
"sort": {
"primary": "distance",
"direction": "asc"
},
"range": {
"count": 10,
"start": 0
},
"findFilters": [
{
"filterName": "string",
"filterVaule": "string"
}
],
"operationName": "or",
"useFirstAmbiguous": true
},
"distance": 20,
"location": {
"address": {},
"geocodes": {
"latitude": "30.26759000000004",
"longitude": "-97.74298999999996"
},
"placeName": "Austin"
},
"distanceUnit": "mi",
"metaDataOptions": 0
},
"wsRequestHeaderV2": {
"userId": "CDISIUserID",
"userBid": "10000108",
"requestTs": "2021-04-14T20:28:16.000Z",
"applicationId": "VATMLOC",
"correlationId": "909420141104053819420",
"requestMessageId": "rohuang-001"
}
}'

 

 

 

3 REPLIES 3
SyedSa
Community Moderator

Re: Find Near by ATMs return 403 error

Hi @fridric, Thank you for reaching out. An agent will get back to you as soon as possible. Until then, if any community member knows a solution, feel free to reply in this thread.

fridric
New Contributor

Re: Find Near by ATMs return 403 error

Hi @SyedSa, is there a way to get a faster response on this issue? Thanks!

DianaVisaPM
Visa Developer Support Specialist

Re: Find Near by ATMs return 403 error

Hey @fridric,

 

It sounds like you are encountering a 403 Forbidden error specifically when making requests to the Totals Inquiry API in the Visa Global ATM Locator Sandbox environment, while other API calls, such as the Geocode Inquiry, work fine with the same credentials. Here are several steps you can take to troubleshoot and resolve this issue:

1. Check Permissions: Double-check that your project settings on the Visa Developer Portal explicitly include permissions for the Totals Inquiry API. Even though you mentioned that it's included, it might be worth rechecking or re-enabling the API to ensure that no settings were accidentally altered.

2. Endpoint URL: Ensure that the endpoint URL used for the Totals Inquiry API is correct. Based on your cURL request, it looks like you are using the endpoint for ATM Locator Inquiry. Confirm that you are using the correct endpoint for Totals Inquiry specifically.

3. API Keys and Credentials: Verify that the API keys and credentials (e.g., userId, userBid, etc.) used in the request are correct and have the necessary permissions for accessing the Totals Inquiry API. Sometimes the credentials might have API-specific restrictions.

4. Request Headers: Make sure that all required headers are correctly set, including the `Authorization` header. Ensure that the `Authorization` value is correctly encoded and valid.

5. Request Body: Confirm that the request body follows the exact format specified in the API documentation for the Totals Inquiry API. Sometimes even small discrepancies can cause issues.

6. Regional Restrictions: Although you mentioned there are no regional restrictions, it’s beneficial to double-check if there are any specific regional settings or restrictions within your Visa Developer project setup.

7. Two-Way SSL: Since you mentioned that two-way SSL is working correctly, ensure that the SSL certificates are up-to-date and properly configured.

 

Here is a revised version of your cURL request, ensuring it aligns with typical API request formats:

```sh
curl --location --request POST 'https://sandbox.api.visa.com/globalatmlocator/v3/localatms/atmsinquiry' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic [REDACTED]' \
--data '{
"requestData": {
"culture": "en-US",
"options": {
"sort": {
"primary": "distance",
"direction": "asc"
},
"range": {
"count": 10,
"start": 0
},
"findFilters": [
{
"filterName": "string",
"filterValue": "string"
}
],
"operationName": "or",
"useFirstAmbiguous": true
},
"distance": 20,
"location": {
"address": {},
"geocodes": {
"latitude": "30.26759000000004",
"longitude": "-97.74298999999996"
},
"placeName": "Austin"
},
"distanceUnit": "mi",
"metaDataOptions": 0
},
"wsRequestHeaderV2": {
"userId": "CDISIUserID",
"userBid": "10000108",
"requestTs": "2021-04-14T20:28:16.000Z",
"applicationId": "VATMLOC",
"correlationId": "909420141104053819420",
"requestMessageId": "rohuang-001"
}
}'
```

 

If you have verified all the above and the issue persists, then let us know you require further assistance. We can provide more detailed insights and check if there are any backend issues or if additional configuration is needed on their end.

 




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.