cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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
Highlighted
Regular Visitor

Re: Custom Connector POST Json

I solved the problem 

 

release the external remote access in api server.

 

thanks

View solution in original post

5 REPLIES 5
Highlighted
Community Support
Community Support

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.
Highlighted
Regular Visitor

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

Highlighted
Regular Visitor

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’

Highlighted
Community Support
Community Support

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.
Highlighted
Regular Visitor

Re: Custom Connector POST Json

I solved the problem 

 

release the external remote access in api server.

 

thanks

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (5,842)