I have created a POST API using Google App script but it doesn’t seem to work with API Connector and gives a 405 error or “Raw error for the API. Argument error, options.body.”
The same API works just fine in Postman.
Also, the GET API built in Google App script seems to work fine with API Connector.
I have added ContentType: application/json and other stuff I came across on Bubble forum but the problem still persists.
Check in postman settings if ssl verification is toggled on or off. Try to run the API with SSL toggled-on in postman. Bubble API connector by default verifies the SSL certificate
Hi. Thanks for your prompt response. I toggled SSL Certification ON and OFF in Postman and it is working fine. Also, if this were the problem then even GET API wouldn’t run. Right? My GET API works fine in Bubble.
I’ve been try for years making working on Bubble. The only solution I found is to use GET and parse parameter. But don’t use it if you have sensitives data because url is readable.
Sounds like 2 years Post doesn’t work anymore from Bubble.io (Api connector or even custom code) to AppScript for an unknow reason.
Hey. There is some issue with redirection that Postman handles but API Connector doesn’t. Probably for POST API created in Google App Script to work in API Connector, we need to change the Google App Script code so that it can handle this error. Since I am not a coder I can’t at this point tell exactly what to do.
Requests to Google Apps Script always happen in two stages: The first request draws a redirection response to a generated URL, and the second request to that URL draws the response that you programmed. Google Chrome makes the second request as a GET request (without repeating the POST payload, which the server already knows under the generated URL) and this works. However, if your client does not change the method and makes the second request again as a POST, the server does not accept this and responds with “405 Method Not Allowed”.
Bubble follow the redirect. But also follow with the original Method, and this is the issue. There’s no way actually to change that in API Connector.