Problems using POST to interact with 3rd party API

Hi

I’m trying to use a 3rd party API (rentprofile.co) which I know responds correctly to the information I’m sending it. There seems to be some problem POSTing via Bubble which neither their staff nor I can solve.

We’ve demonstrated that the POST instruction works fine here: https://apitester.com/shared/runs/c39d732934614ee18d3a3e359be1d71f

However our attempt to POST exactly the same parameters via Bubble fails with message:

"There was an issue setting up your call.

Raw response for the API
Not Acceptable".

These are the parameters we’re POSTing to https://www.rentprofile.co/v1/api/status/request

request_id: 3d51225d80
api_key: fctayvxiuhijortuhioxoj9yafs3jdxhgcvuywfiovsoavajds

Can anyone help? You can play around with a demo app here:

Grateful for any help!

We’ll look into this

Your test example is using query string parameters, so maybe you will have better luck using the following for your POST string and removing your other parameters:

https://www.rentprofile.co/v1/api/status/request?api_key=[api_key]&request_id=[request_id]



Looking to accelerate your app development?

Let me turn
:thinking: :tired_face: :confounded:

into
:grinning: :sunglasses: :woman_student:

Development through Coaching at https://uniqueideas.com or schedule a free intro session :gift:

Ken Truesdale
LinkedIn

We use a Node package for this request and it looks like the API provider is returning this error:

{“method”:“post”,“timeout”:60000,“url”:“https://www.rentprofile.co/v1/api/status/request?request_id=3d51225d80&api_key=fctayvxiuhijortuhioxoj9yafs3jdxhgcvuywfiovsoavajds",“followAllRedirects”:true,“followOriginalHttpMethod”:true,"forever”:true}

Could you reach out their support for more information on this error.

Thanks @mebeingken - I’m afraid that didn’t work for me. If you manage to make it work in the Bubble app I linked to I’d be super grateful to know about it :slight_smile:

Will do, thanks @neerja

Hi Neerja, just looking at the JSON response there, it appears like the issue is with the Node package Bubble is using to make the request. The timeout in the response seems to be due to Bubble not being able to handle the raw JSON response.

I suggest that Bubble adapt their requests to mimic those of Postman, API Tester etc.

Regards, David - CTO RentProfile

Hi @neerja, following David’s response here, is there any chance of Bubble adapting the API request code so that it works with RentProfile’s API in the same way as Postman and other services? I can’t see a way for our app to work with their API otherwise.

Add the header Accept with the value application/json.

3 Likes

Thanks Jarrad - that’s perfect!