Today - I had to update my API token -- and now I am getting back {"issues":[],"isLast":true} in my VBA code
Here is my code:
Public Sub TESTVBA()
Dim url As String
Dim xhr As New MSXML2.XMLHTTP60
Dim auth As String
url = "https://jciproducts.atlassian.net/rest/api/3/search/jql?jql=issuekey=GIV-177031&fields=*all"
auth = "Basic " & Base64Encode("MyEmail@domain.com:yourAPIToken")
xhr.Open "GET", url, False
xhr.SetRequestHeader "Authorization", auth
xhr.SetRequestHeader "Accept", "application/json"
xhr.SetRequestHeader "User-Agent", "PostmanRuntime/7.29.0"
xhr.Send
Debug.Print xhr.ResponseText
End Sub
Note: I have to do the User-Agent - otherwise it tells me result is not supported in the browser.
I have to use MSXLM2.XMLHTTP60 - which I hope is OK?