API Connector Error: Sorry, we ran into a temporary bug and can't complete your request

I’m trying to use this API but I am getting an error, I tested it on Postman and it’s working without a problem. Now, I’m trying to implement it on Bubble.

I am getting this error, don’t know what’s wrong with my setup

This was the response in Network Tab

{
    "message": "The requested event (API Connector - Initialize Call clicked) is archived(deleted)"
}

I only followed this

Can you share settings in postman? because what you have in Bubble is json, but documentation show url parameters

Thanks for the reply,

This is the header

image

Here’s the body, I am using Password Based Authentication

image

The response should look like this

image

Pretty sure that postman overwrite your content-type header because you have selected x-www-form-urlencoded (or you have twice this header… scroll up to see the one added by default by Postman). Delete your body, and instead add parameters (two, one usr and one pwd) and replace content-type header value by: application/x-www-form-urlencoded

I already modify the postman like you said and still working but how about the settings in Bubble API Connector? I did the same settings but still not working

Change form-data for json or raw. Actually form-data probably also overwrite your content type

Still not working

I look up in network tab and I’m getting this

I am not really familiar with API, but base on my research Password Based Authentication is using session data to authenticate the call but the problem is API Connector does not have this ability to handle Session Data. Not sure about this but this is what I know.

Can you share last setting? You could try to activate querystring checkbox
Link to API doc?
However, the errormyou get is strange. On which Bubble version are you? Maybe you should start from scratch

The API Connector settings

This is the doc

https://frappeframework.com/docs/user/en/api/rest

I did not use the Token Based Authentication since I don’t have the permission to generate API Keys so instead I am using Password Based Authentication

I am using the latest version and this is my first time to encounter this error

According to doc, the correct settings is to use json. While in postman, seem to use url form encoded. Both could work, but documentation show JSON format
Checked this morning and I get the same error you got but this is not related to the error you have to connect this service. Don’t you get any other error in API Connector? I don’t have access to a server for that so it’s a little bit hard to help and do some testing.

Sorry for the late reply, I don’t get any error. The other API are working tho.

I can’t provide you the credentials since this is confidential.

What do you think is the problem? I will try to do another test later.

Send request to requestbin.com endpoint from postman and after do the same from Bubble. Compare both. You could post it here and it may be possible to help you

Just found that Bubble doesn’t seem to overwritte header anymore if you use JSON like it was before (even if it should…) So this may explain your issue. But using requestbin will help a lot to compare both calls and fix this

1 Like

So this is what I’m getting in requestbin

POSTMAN

BUBBLE

I also notice that I’m getting 422 Status in Network Tab but Bubble doesn’t provide this error in frontend.

In Postman, I’m getting this CURL

image

Example of CURL in Docs

https://frappeframework.com/docs/user/en/guides/integration/rest_api/simple_authentication

curl -X POST https://{your frappe instance}/api/method/login \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json' \
     -d '{"usr":"Administrator","pwd":"admin"}'

Thank you very much for helping, I’m trying to practice myself working with API

So according to screenshot, body is not sent the same way from Bubble vs Postman. Can you share your Bubble settings actually?

You should try this setting in Bubble:

I’ve already tried different settings and still can’t make it work. I guess my last resort is to DM you the credentials then probably test it in your end, if that’s fine with you?

You can send me DM no problem

1 Like