ChannelAdvisor API with Power Query Editor

56 views
Skip to first unread message

Sandra Bar

unread,
Sep 29, 2022, 10:14:49 AM9/29/22
to ChannelAdvisor Developer Network
Hello. 

I have tried different variations of what I see in the documentation but I have not been successful in setting up CA api calls in power query. 

Has anyone done this?

let
    URL = "https://api.channeladvisor.com/oauth2/authorize",
    BodyParameters = "{""client_id"":""...."", ""response_type"":""code"", ""access_type"":""offline"", ""scope"":""orders inventory"", ""redirect_uri"":""...?????...""}",
    ParsedJSON = Json.Document(BodyParameters),
    BuildQueryString = Uri.BuildQueryString(ParsedJSON),
    Response = Json.Document(Web.Contents(URL, [Headers = [#"Content-Type"="application/x-www-form-urlencoded", Authorization="... : ...}}"], Content = Text.ToBinary(BuildQueryString)]))
in
    Response

Thank you, 

Sandra
Reply all
Reply to author
Forward
0 new messages