Api Calling For .Net


Sumit Kumar Lal
watch_later 1 week, 6 days ago

While implementing API calling in .Net Application Error showing :

"The remote server returned an error: (400) Bad Request"

Here is the Code

=================

Dim req As WebRequest = Net.WebRequest.Create("https://www.knowyourgst.com/developers/gstincall/?gstin: GST NUMBER")
req.ContentType = "application/json;"
req.Method = "GET"
req.Headers.Add("passthrough: API_KEY")
Dim response As HttpWebResponse = TryCast(req.GetResponse(), HttpWebResponse)

Please suggest ASAP

  • chatComments
1 Answer

Pulkit Sharma watch_later 2 days, 16 hours ago
arrow_drop_up
0
arrow_drop_down

On developers homepage, examples are given for different languages we generated using Postman.

I will suggest to try API in postman and generate code from there.

Unfortunately .NET is alien to me.

Please note, you have pasted API_KEY in your question. You cannot change API_KEY, so create a different account and never disclose your API_KEY at any place.

I have edited question.

  • chatComments
Did Not get Answer?

Join the largest Taxation Q&A platform on internet and ASK YOUR OWN question.

Ask your Question

You need to be logged in to answer.

Ask Question