web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / JSON error when attemp...
Power Apps
Suggested Answer

JSON error when attempting to use HTTP POST

(1) ShareShare
ReportReport
Posted on by 2
Evening,
 
I believe this issue stems from not understanding JSON coding, but I am trying to get a discord bot to post in a channel when new lines are created on a sharepoint list. Everything else appears to function aside from the body of the message itself. I get the error below whenever it tries to post regardless of how I format the body section. I understand that there needs to be a declaration such as { "string": Hello World" } but I can't seem to get that to post either. Any help would be greatly appreciated. 
 
 
{
"_misc": [
"Expected \"Content-Type\" header to be one of {'multipart/form-data', 'application/x-www-form-urlencoded', 'application/json'}."
]
}
 
The goal is to get a message containing this to post the first screenshot's message, and the error screenshot is below that. 
Categories:
I have the same question (0)
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
     
    Can you try adding the Content-Type set to application/json to your HTTP request action headers please. 
     
    Your run should then display this:
    Headers:
    {
    "Content-Type": "application/json",
    "Authorization": "sanitized"
    }
     
    Hope this helps.
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
  • Ravindra Jadhav Profile Picture
    342 Moderator on at
    I think nandit answer will work, kinldy closed the question if not please explain it more
     
     
     
     
    Please Closed the Question, Mark it Solved 
     
    If my answer helped resolve your issue, please consider marking it as solved to assist others facing the same problem. Additionally, giving it a like would be greatly appreciated and motivates us to keep helping
     
    Thank You
    Ravindra Jadhav
  • Shashank Bhide Profile Picture
    946 Moderator on at
    What is shown in the body is by no means a valid JSON. what is JSON.Stringify doing in the body? it's used in the JavaScript, so you have convert your payload into a valid JSON first.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard