Since Bubble is taking over 2 weeks to get back to me about solving this issue. I thought I would post it here and see if anyone has a workaround to get this to work.
This happens with multiple APIs so far and I am not sure what Bubble is doing differently to make it not work. I vaguely remember something on the forum about it but canât find the post.
Here is the issue:
I am trying to post, as an example, to LinkedIn as a Business Page. I set up the API call with the API Connector and it works fine. It initializes fine. When I go through the workflow it fails but I actually copy the data I am sending in the workflow to a dataType called Dev Log so I can see if there are any mistakes on my end. I check the JSON format, it is valid. I then use the SAME EXACT DATA and put it in the API Connector, and it works.
Why would this work in the API connector but not in a workflow. This is the error I am getting in the workflow:
{"status":400,"code":"ILLEGAL_ARGUMENT","message":"Request body could not be converted to data map"}"
Here is the screenshot of the workflow that is causing the issue.
Can you check if the data are available at the endpoint?
I believe itâs the same issue I highlighted 4 days ago now but Bubble support decided to ignore me and others.
Dynamic data are not populated on API call in multiple parts of my app. We thought it affected only user data but itâs clear now it affects also other functions.
This has been going on for weeks for me, itâs not a new issue. I can see the data in the logs as well. So the data is being passed through. It just doesnât like it for some reason.
You just need to change your URL to the requestbin one. Send the request that work in API connector to initialize your call (donât save the response, this should keep the initial response you got when initialized correctly). After, just run your workflow to send it from dynamic data like you are doing when running the action with the âcorrectâ url.
The goal is just to validate the payload sent (that is often hard to see in Bubble logs)
Exactly. This wonât do anything to linkedin API. But you will be able to compare the payload from Connector (that work) VS run mode (workflow) that doesnât and find if the body have an issue.
If requestbin doesnât parse the body, you can copy it in jsonlint to find the error in the json.
I know that sometimes Bubble send the request payload with line return and space encoded. (I didnât investigate if this happen more with arbitrary-textâŚ) In most case, to fix that you just need to remove all newline and space in the payload to just have a single string. (By space, I mean in the json structure, not in the values or keys. So for example:
Now I am getting this error: {"status":429,"serviceErrorCode":101,"code":"TOO_MANY_REQUESTS","message":"Resource level throttle APPLICATION_AND_MEMBER DAY limit for calls to this resource is reached."}"
I think I need to wait to test again. This is weird though, why would it limit me. Maybe I need to try a different company.
Good question. Sometimes, this is considering all request from Bubble (like OpenAI for example). This could be related to api key too. Read documentation to know more about that.
This seemed to have solved the issue I was having. Still some things to work out, but removing all of the return and spaces seems like the main issue. So weird that it works sometimes but not others. Thanks @Jici