Web API Power BI Query Anonymous

Isbenji

New Member
Joined
Jul 7, 2020
Messages
17
Office Version
  1. 2016
Platform
  1. Windows
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

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.

1645112009958.png


If anyone can provide assistance, please :)
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top