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
Anonymous
Not applicable

POST Request Error

Hi,

I'm really struggling to find what is wrong with my M code to make a POST request. Although I know you would need to know the API to know exactly what is wrong but I just want to check that there is nothing wrong with the way I am making the request? As I am getting a 400. Bad Request error.

For info the API I'm using is Clockify.

roblaing_1-1614879898414.png

I have connected to the API fine for GET requests but can't figure out what I'm doing wrong. And I just want to rule out that I am doing something wrong with the Request rather than misunderstanding the API.

 

Thanks for any help at all

 

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

Hi @Anonymous ,
I cannot spot anything obvious.
But you can reduce the risk of typing errors if you use the Json.FromValue function to define the body of your request: Easy POST requests with Power BI and Power Query using Json.FromValue – The BIccountant 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

1 REPLY 1
ImkeF
Community Champion
Community Champion

Hi @Anonymous ,
I cannot spot anything obvious.
But you can reduce the risk of typing errors if you use the Json.FromValue function to define the body of your request: Easy POST requests with Power BI and Power Query using Json.FromValue – The BIccountant 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

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.