使用VBA Excel 2010访问JIRA

我想使用VBA和Excel自动化JIRA中的Excel报告,我正在尝试使用VBA访问JIRA以将数据导出到Excel。 所以,我从validation开始,然后尝试使用此代码导出数据:

Private JiraService As New MSXML2.XMLHTTP60 Private JiraAuth As New MSXML2.XMLHTTP60 Sub JIRA() With JiraAuth .Open "POST", "https://jiralink/rest/auth/1/session", False .setRequestHeader "Content-Type", "application/json" .setRequestHeader "Accept", "application/json" .send " {""username"" : """username""", ""password"" : """password"""}""" MsgBox .Status If .Status = "200" Then sCookie = "JSESSIONID=" & Mid(sErg, 42, 32) & "; Path=/" & sPfad Login = True End If End With With ActiveSheet.QueryTables.Add(Connection:= _ "URL;https://jiralink/sr/jira.issueviews:searchrequest-excel-all-fields/temp/SearchRequest.html?jqlQuery=project+%3D+NAME+AND+Sprint+%3D+1+ORDER+BY+priority+DESC%2C+updated+DESC&tempMax=1000" _ , Destination:=Range("$A$1")) .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlEntirePage .WebFormatting = xlWebFormattingNone .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With End Sub 

我得到错误:403禁止任何人都可以帮我吗? 对不起,我是VBA和JIRA的新手