sal21
2 years agoNew Contributor
https://developers.openapi.it/ and counter
I'm on vba.
I need to set my get statement, for https://developers.openapi.it/services/oauth#tag/counters
i just have email of my account and apykey
This is my code for all my get statement in general:
Option Explicit
Private Sub RestExample1()
Dim APICall As String
Dim myXML As New MSXML2.DOMDocument60
APICall = "https://oauth.openapi.it/counters/total/"
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", APICall, False
.setRequestHeader "Authorization", "Basic xxxxxxxxxxxxxxxxxxxxxxxxxxx"
.send
Debug.Print .responseText
End With
End Sub
how to set the this:
.setRequestHeader "Authorization"
tks.
note:
for test i can send my account id and password