I am new to this and I am probably missing out on something. I am trying to query API with Power BI. I created the following Json API
When going for anonymous authentication, I am encountering the following error response, if anyone can help me a bit to understand what is going wrong? I am not sure if it is about my Json advanced editor or the way I am trying to authenticate.
If anyone can provide assistance, please
VBA Code:
let
url = "https://api.mews-demo.com/api/connector/v1/accountingItems/getAll",
headers = [#"Content-Type" = "application/json"],
postData = "{
""ClientToken"": ""E8CD5356C7EAA47C2A00AACAD010831E4-167E8005911CE1D19EAA5261C29C6DD"",
""AccessToken"": ""744222C2F86B48F48798ACAD0108D37F-B326A9234EEAF5713B69769434EA4B2"",
""Client"": ""Ben Test"",
""ConsumedUtc"": {
""StartUtc"": ""2022-01-05T00:00:00Z"",
""EndUtc"": ""2022-02-10T00:00:00Z""
},
""ClosedUtc"": {
""StartUtc"": ""2022-01-05T00:00:00Z"",
""EndUtc"": ""2022-02-10T00:00:00Z""
},
""Extent"": {
""OrderItems"": true,
""PaymentItems"": true,
""CreditCardTransactions"": true
}
}"
,
response = Web.Contents(
url,
[
Headers = headers,
Content = Text.ToBinary(postData)
]
),
jsonResponse = Json.Document(response)
in
jsonResponse
When going for anonymous authentication, I am encountering the following error response, if anyone can help me a bit to understand what is going wrong? I am not sure if it is about my Json advanced editor or the way I am trying to authenticate.
If anyone can provide assistance, please