Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
BIUser22232
New Member

Tables through the API

I'm trying to bring tables through the hotmart API but I'm not succeeding, does anyone know how to solve it? I believe my code is wrong

BIUser22232_0-1676672589146.png

BIUser22232_1-1676672636359.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @BIUser22232.

You can try to use the following codes if it suitable for your requirement::

let
    url = "api-sec-vlc.hotmart.com",
    token = "xxxxx",
    response = Web.Contents(
        url,
        [
            RelativePath = "/security/oauth/token",
            Headers = [
                Authoraztion = "Basic " & token,
                #"Content-Type" = "application/json"
            ],
            Query = [
                grant_type = "client_credentials",
                client_id = "id string",
                client_secret = "secret string"
            ]
        ]
    ),
    AccessToken = Json.Document(response)[access_token]
in
    AccessToken

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

HI @BIUser22232.

You can try to use the following codes if it suitable for your requirement::

let
    url = "api-sec-vlc.hotmart.com",
    token = "xxxxx",
    response = Web.Contents(
        url,
        [
            RelativePath = "/security/oauth/token",
            Headers = [
                Authoraztion = "Basic " & token,
                #"Content-Type" = "application/json"
            ],
            Query = [
                grant_type = "client_credentials",
                client_id = "id string",
                client_secret = "secret string"
            ]
        ]
    ),
    AccessToken = Json.Document(response)[access_token]
in
    AccessToken

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.