Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I started a new web Application Project in visual studio to use it to connects to a specific HTTPS WebService to get data from database, I click on to add a web reference In the solution explorer and when I type the URL and try validate it I get this error "The request failed with HTTP status 403 : Forbidden." and there isn't any option to add the api key or any other parameters just the URL and once I fill it the error appear and I don't know what should I do? Any help would be appreciated.
FYI : when I use other http webservice everything works fine but for https URL I need the api key and I don't know where to add it.

What I have tried:

Only with Apps like Postman I can make my test with a successful connection to the WebService because there I can add the api-key in the headers configuration of Postman, but with visual studio I only see the URL field when I click on "add reference"
Posted
Updated 8-Dec-21 20:34pm
v2
Comments
Richard MacCutchan 4-Dec-21 11:03am    
Please use the Improve question link above, and add complete details of the code you are using.
Member 14223731 4-Dec-21 14:56pm    
I just added more information, I would like to inform you that I had the error before writing any code I just made a new project then I clicked on add web reference to connect to the webservice but I couldn't so I'm still trying to connect without any result. I sincerely appreciate your help
Dave Kreskowiak 4-Dec-21 18:42pm    
Consult with the owner of the API and see if you can specify the API Key as part of the URL.
Member 14223731 6-Dec-21 2:37am    
thanks

1 solution

Self explanatory. You need access so check with particular Webservice's owner.

FYI
How to Fix a 403 Forbidden Error[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900