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
jpt1228
Responsive Resident
Responsive Resident

API with basic authorization token comma expected error

Hello, I am trying to figure out my error in this API query. I want to add the page= as a variable outside of the base URL because I cannot schedule a refresh in the Power BI service with a dynamic string. I think I have the query correct but i'm getting a Token Comma expected error.

 

 

(pagestart as text)=>

let
    Source = Json.Document(Web.Contents("https://harvest.greenhouse.io/v1/jobs?", [Headers=[AUTHORIZATION="Basic xxxxxx=",
    Query=[page="&pagestart&"]])),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "name", "requisition_id"})

in
    #"Expanded Column1"

 

 

jpt1228_0-1617801317253.png

 

4 REPLIES 4
sayaliredij
Solution Sage
Solution Sage

Could you try following M Query

 

(pagestart as text)=>

let
Source = Json.Document(Web.Contents("https://harvest.greenhouse.io/v1/jobs?", [Query=[page="&pagestart&"]])),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "name", "requisition_id"})

in
#"Expanded Column1"

 

this is without authentication. 

when you will enter this you will be asked the power bi-based authentication and there you can enter. I think its not required to pass here





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@sayaliredij Thank you for responding. Unfortunately this is where I am stuck at. I need to hard code the authentication into the URL and change to anonymous web authentication and pass the page parameter outside of the Source = Json.Document(Web.Contents("https://harvest.greenhouse.io/v1/jobs?"

 

When I schedule refresh in the service it will not allow dynamic URL's. Based on my research I need a static connection string for Power BI service to validate and then using a relative.path or other method to add the dynamic page= to string. 

 

This is the source document I am referencing to "fake" the Power BI service to schedule refresh. "Fake Out" PBI blog 

sayaliredij
Solution Sage
Solution Sage

Could you try this ?

 

(pagestart as text)=>

let
Source = Json.Document(Web.Contents("https://harvest.greenhouse.io/v1/jobs?", [Headers=[#"AUTHORIZATION"="Basic xxxxxx="]
,Query=[page="&pagestart&"]])),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "name", "requisition_id"})

in
#"Expanded Column1"





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @sayaliredij that removed the error, but it doesn't appear to pass the function correctly to the base URL to change the page=1, then page=2 etc. The URL looks the same as the one that works for a single page but the %26 leading and trailing I believe are causing the error. Maybe I am not calling the function correctly?

jpt1228_0-1617809411321.png

 

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.

Top Solution Authors