I'm trying to get information from Businnes Central on premise.
Using Browser, Excel or Power BI I can connect and obtain data without problem, but I can't doing using B4J.
This is the code I'm using:
And this is the response:
Could anybody help me?
Thanks.
Using Browser, Excel or Power BI I can connect and obtain data without problem, but I can't doing using B4J.
This is the code I'm using:
Code Example:
Private Sub Button1_Click
Dim j As HttpJob
j.Initialize("", Me)
j.Username = "xxx"
j.Password = "yyy"
j.Download("http://192.168.0.10:19058/BC190_DD/ODataV4/Company('DB_NAME')/LocationListPage")
j.GetRequest.Timeout = 3000 * 1000
j.GetRequest.SetHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8")
'j.GetRequest.SetHeader("Authorization", "Basic xxxx yyyy ")
j.GetRequest.SetHeader("Authorization", "Basic ")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
End If
j.Release
And this is the response:
Response::
ResponseError. Reason: Unauthorized, Response:
Could anybody help me?
Thanks.