We’ll soon be releasing a new Bubble Version with two changes.
The first will address a bug in the API Connector where if you had a call with the body type JSON, we did not explicitly send that the content-type in the header is JSON (content-type: application/json) which could cause issues for APIs that required this parameter. We now pass in this content-type when making an API call if applicable. If you have manually set a content-type in your header parameters, it will not get overwritten and we will send the one you specified.
The second addresses a rounding bug. When using the “formatted as” operator to round a number, users will have the number be rounded like the “rounded to” operator. This will fix a bug when rounding a number to 3 decimals using the “formatted as” operator.
You can upgrade to the latest version in the Settings->Version tab.
Not working in Dev after Upgrading to version 28. Still getting error from Stripe saying
Raw response for the API
Status code 400
{
“error”: {
“message”: “Invalid request (check that your POST content type is application/x-www-form-urlencoded). If you have any questions, we can help at Stripe: Help & Support”,
“type”: “invalid_request_error”
}
}
The same call works fine via Curl from Terminal or from Postman
Okay that’s a you problem and isn’t related to this update. Set your Content-Type to application/json, and set your parameters like this and it’ll be good:
Correct me if I’m wrong, but from what I read I believe the update was supposed to detect the JSON body and set the Content-Type to application/json for you, which I assume was to make it easier for beginners. It’s in the first paragraph and the first part of this update.
I mirrored all my API calls to Stripe to how you set them up in your course. Did you do this upgrade yet and have you had to make any changes in API connector? This is how most of the calls look - I haven’t upgraded yet I’m nervous something will break. I’m not sure if something will change in the content-type key
Hey all - Thanks for the feedback. We investigated into this issue a bit more, and we found that Bubble Version 28 currently does overwrite custom content-types in shared headers with multiple API calls. At the moment, we recommend that you wait until we re-release the Bubble version to upgrade. If you have already upgraded Bubble versions, you can downgrade to avoid this issue.
Upgrade to version 28 broke all my MS Graph calls from API connector. I had to add a content-type = application/x-www-form-urlencoded header to the token call. The body has always been in this format but I guess the change to version 28 has added an application/json header behind the scenes which is what stuffed it up. Is there any way to see debug information for these OAuth2 token requests?