watch_later 18/06/18

Sir;

How to use your API for search GST Number details with vb6, I used 

httpObject.Open "get", "https://www.knowyourgst.com/developers/gstincall/?gstin=gst-number" method

Code used:

Const HTTPREQUEST_PROXYSETTING_DEFAULT = 0
Const HTTPREQUEST_PROXYSETTING_PRECONFIG = 0
Const HTTPREQUEST_PROXYSETTING_DIRECT = 1
Const HTTPREQUEST_PROXYSETTING_PROXY = 2

Const HTTPREQUEST_SETCREDENTIALS_FOR_SERVER = 0
Const HTTPREQUEST_SETCREDENTIALS_FOR_PROXY = 1


Dim httpObject As New WinHttp.WinHttpRequest

Private Sub cmdSend_Click()
On Error GoTo Handler
Dim passthrough As String
httpObject.Open "get", "https://www.knowyourgst.com/developers/gstincall/?gstin=gst-number"
passthrough = "API_KEY"
httpObject.Send

MsgBox httpObject.ResponseText
Set httpObject = Nothing
Exit Sub

Handler:
MsgBox Err.Description
End Sub

Function getdata(url As String, data As String) As String
Dim WinHttpReq As Object, status As String, response As String
On Error GoTo errorfound
Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
WinHttpReq.Open "get", url, False
WinHttpReq.Send data
getdata = WinHttpReq.status & " ? " & WinHttpReq.StatusText & " ? " & WinHttpReq.ResponseText
Exit Function
errorfound:
getdata = Err.Description
End Function

 

sorry nothing can found ; please help me out

thank you

with regrads

samim

2 Responses | Latest response: 19/06/18 | Sort by Likes(thumb_up) Recent | GST Reply
watch_later 19/06/18

Sir

Try to run developers homepage php code with gstin and api key with  but not worked

watch_later 19/06/18

Looking at your code, I have removed API_KEY. Please do not share it with anyone.

Second in URL you have not mentioned GST number. Try with actual GST number.

I am not aware how VB6 works so may not be help on this part. Try running it with PHP and other examples given on developers homepage.

Once you have it working, migrate code to your VB6 project.

Meanwhile will try to look for a solution. Do share your results after inserting GST number in your example.

JOIN LARGEST DISCUSSION PLATFORM

Sign up to discuss taxation, accounting and finance topics with experts from all over India.

Join Discussion