Re: Http response code 403

VB1
Helper

Http response code 403

Hi.

 

I need to consume "near by merchant search" API but getting following response in SOAPUI.

 "responseStatus": {
        "statusCode""API007",
        "statusDescription""Forbidden - Client is not subscribed to web service"
    }
 
My request details are as follows , sending Client-Id in header it is a required but i am not aware from where I will get client-Id?(mentioned in Yellow color in postman screenshot) Please suggest. : 
 
 
Payload : 
{
  "searchOptions": {
    "matchScore""true",
    "maxRecords""2",
    "matchIndicators""true"
  },
  "header": {
    "requestMessageId""VCO_GMR_001",
    "messageDateTime""2015-08-28T22:05:00.000"
  },
  "searchAttrList": {
    "distanceUnit""m",
    "distance""30",
    "merchantCity""san francisco",
    "merchantCountryCode"840,
    "merchantState""ca",
    "merchantName""starbucks"
  },
  "responseAttrList": [
    "GNLOCATOR"
  ]
}
POST MAN Details : 
merchantsearch.JPG
 
 
Regards,
Vaibhav
4 REPLIES 4
I_Doroteo3
Visa Developer Support Specialist

Re: Http response code 403

Hi @VB1,

 

The 403 (Forbidden) HTTP Status code indicates that this project does not have permission to access the requested resource. This can happen if you are trying to invoke API request for a resource that is not part of your project e.g. if you have created a project with Visa Direct Product but are trying to use the same credentials to access Visa Consumer Transaction Controls.

Check for the following:

  • You are using a project and the credential for the project which includes the API being accessed.
  • Create a project and receive sandbox credentials for the API’s being called.
  • Add the API being called (if not already included) to the project with credentials that are being used.

Thanks, 

Illana

VB1
Helper

Re: Http response code 403

I believe issue is due to Client-Id :  Please suggest from where I will get Client -Id so that I can pass to API in header as It is required field in request header? For your reference Highlighted below.

 

Client-Id.JPG

petersmaze
Newbie

Re: Http response code 403

I have same issue.. any type of solution
I_Doroteo3
Visa Developer Support Specialist

Re: Http response code 403

Hi @VB1 and @petersmaze

 

I spoke to the technical team and confirmed that any string of numbers can work for the ClientID when in the sandbox environment for Merchant Search API. This header parameter is not validated by Visa in sandbox.

 

As stated above, please check for the following:

  • You are using a project and the credential for the project which includes the API being accessed.
  • Create a project and receive sandbox credentials for the API’s being called.
  • Add the API being called (if not already included) to the project with credentials that are being used.

Thanks, 

Illana