cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlaskanPowrUser
Frequent Visitor

Multiple Custom Connector Issues

I have created a postman collection that contains two api calls, and via postman, I have them working appropriately. 

 

However I am struggling to apply the headers, the value for the headers, and the raw body, into the custom connector without it requesting that information later on. its never going to change. I don't want to put it every time. 
This is what I have so far: 
The request:

AlaskanPowrUser_1-1629685142515.png

Within those headers, and that body, i have edited them. I have marked them all as required. I have also supplied default values, which is what i want the value of those headers to be. 

When i reach my "Test" portion, I EXPECT this to WORK: 

AlaskanPowrUser_2-1629685229933.png

However, it does not work. you see the 401. I MUST fill in the values for the headers ,and the body, even though i set default values. 

AlaskanPowrUser_3-1629685423399.png

You can see I now successfully receive a 200 response. there is a value in the body I need to retrieve inside of powerapps. But inside powerapps, when I use this custom connector, I expect to be able to Set(varCustomConnectorResponse,CustomConnector.Action()) and retrieve the response value inside of varCustomConnectorResponse

INSTEAD, Powerapps looks like this:

AlaskanPowrUser_4-1629685703556.png

 

It is very much expecting me to supply those fields. 
okay, whatever. I'll hard-code the fields inside my app, right? 

AlaskanPowrUser_5-1629685991919.png

WRONGO! You can see me setting a variable (this is onclick a button btw) to the response of my api call. You can see my error. and instead of the nice detailed messages i get when testing my custom connector, I get "There was an error" inside the powerapp. How useless lol 😞 

WHAT AM I DOING WRONG?! 😞 I've been trying this for 10 hours today. I'm stumped. I feel like im SO CLOSE! 



 

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

What kind of auth are you using? Consider defining an auth type instead of hardcoding the value. Also checkout this policy template: https://docs.microsoft.com/en-us/connectors/custom-connectors/policy-templates/setheader/setheader

 

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Top Solution Authors
Users online (3,987)