cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JeffersonSilva
Level: Powered On

Custom Connector POST Json

I'm creating an API Custom Connection with POST, but it is not working

 

I managed to make the connection on Postman, but when I tried the importing in powerapps it did not work.

 

here are some prints, can you help me?

 

http://www.erp.ladder.com.br/api/erp/saldo-estoque-ladder/

 

HTTP 200 OK
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "scs": {
        "estoque": 1,
        "saldo": 1,
        "reserva": 0
    },
    "exists": true,
    "rj": {
        "estoque": 0,
        "saldo": 0,
        "reserva": 0
    }
}

 post json:
{"produto": "catalog_number"}

 

Duvida 1.pngDuvida 2.pngDuvida 3.pngDuvida 4.pngDuvida 5.pngDuvida 6.pngDuvida 7.pngDuvida 8.pngDuvida 9.png

1 ACCEPTED SOLUTION

Accepted Solutions
JeffersonSilva
Level: Powered On

Re: Custom Connector POST Json

I solved the problem 

 

release the external remote access in api server.

 

thanks

5 REPLIES 5
Community Support Team
Community Support Team

Re: Custom Connector POST Json

Hi @JeffersonSilva ,

Where do you deploy your API?

Based on the error message that you mentioned, it seems to tell that PowerApps could not send a POST request to your API server.

 

Please check if you have configured a port your API server, if yes, please consider modify the Host  value within your custom connector as below:

www.erp.ladder.com.br:Port Number

Also please check if you have enabled the Remove Server connect functionality for your API Server. Please also check and see if the following article would help in your scenario:

https://dwmkerr.com/publish-web-web-deploy/

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JeffersonSilva
Level: Powered On

Re: Custom Connector POST Json

Hi @v-xida-msft  

 

is a rest api using standard port 80,

 

the API works perfectly in POSTMAN, but powerapps is giving this error

 

follows image attachment of the functioning of the api

JeffersonSilva
Level: Powered On

Re: Custom Connector POST Json

I talked to my developer and he said that the requests arrive, but lack the body in JSON format

KeyError at /api/erp/saldo-estoque-ladder/ ‘produto’

Community Support Team
Community Support Team

Re: Custom Connector POST Json

Hi @JeffersonSilva ,

Could you please share a bit more about the Request Body of your Post Request in your custom connector?

Do you specify the data transfer format within the Headers part of the Post request within your custom connector?

 

On your side, please consider specify the data transfer format within the Headers part of the Post request within your custom connector as below:2.JPG

Content-Type application/json
Accept application/json

then save your custom connector, try it again, check if the issue is solved.

 

In addition, you could also consider take a try to create a OpenAPI definition file for your Rest API, then create a custom connector based on the OpenAPI definition file, check if the issue still exists.

 

More details about creating custom connector in PowerApps, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/register-custom-api

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JeffersonSilva
Level: Powered On

Re: Custom Connector POST Json

I solved the problem 

 

release the external remote access in api server.

 

thanks

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 94 members 4,186 guests
Please welcome our newest community members: