Skip to main content

Notifications

Power Apps - Connector Development
Unanswered

Custom Connector with urlencoded body

Like (2) ShareShare
ReportReport
Posted on 30 Sep 2024 17:23:27 by 5
Hello! I've setup custom connectors before, but it's mainly been with Content-Type: application/json. I'm now working with a Content-Type: application/x-www-form-urlencoded and I'm struggling!
 
The below curl is what I can use to call the API successfully via terminal:
curl --location 'https://sampleWebpage.com/runAPI' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic base64encryptedAuth' \
--data-urlencode 'expression=callApi(Param1= "param1", Param2="param2", paramValues = [ {} ] );'
 
Below is how I configure the definition of the custom connector given this curl
 
When I go to test the custom connector however, I use the below values:
 
I'm able to get past authentication, but the 400 error tells me that the "expression" is not configured correctly. I'm pretty sure it's because the body is configured incorrectly. The body almost feels like it wants to treat it like an application/json, but there is technically no body, there's instead data-urlencode. I've tried doing something similar by having that as a header but still no dice. Is there a trick to how to define custom connectors when it's a urlencoded type? Is there maybe a policy I need to define? I've been working on this for days but can't get it!
 
Categories:

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,316

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,290

Leaderboard

Featured topics

Loading complete