Retrieving Data from Callback to show on frontend

as for the webhook being triggered,

I get trigger when doing ‘request data’ so API Call is working perfect, but i dont think its getting triggered when actually testing. Or maybe its just something wrong with my backend workflow?

I think the problem here is that the backend workflow is not being triggered.

I believe I am doing everything correctly, have my custom event set up, have the button trigger set up, have the backend workflow set up and it is receiving the data. But I believe it is not being triggered.

Here is button click frontend workflow:

Here is custom event:


And here is the backend workflow:



It is not even setting the ‘newImages’ data point into a new list of images, which it should be doing. This is why I believe its not being triggered. But the webhook is working and it is receiving data when I tested

In the webhook call ‘image_gathering’

  • How are you authenticating the call? I cannot see that you’re passing any custom token in the api call, or passing a user anywhere and at the same time the workflow requires authentication
  • I think the current user expression in that case is an admin-user that runs the backend workflow not the current user on the front-end … you can try do a search for user to get the linked user to this callback
1 Like

When I send the initial API Call (before the webhook), it is done with Authentication (my API Key), and also sends the callback URL along with it which is in the JSON Body of the call.

I’m confused by what you mean on the second point?

Thanks.

So the second point is that because it’s using your api key, it acts as you (as the admin/app owner/system/super-user) … so the admin is the current user in that case not the front-end user who clicked on the button … to debug the issue

  • Can you try do a search for user, where email = your email and then check your cell or account if the items are added to you
  • add a new datatype called debugging api that has those fields (logged, finished at, number of images)
  • create a new record and set logged to started or logged, and then make changes at the end of the call to the result of step 1 (create a new record) with the finished at (current-datetime), and number of images (results from api request images count)

But doesn’t this imply that every API key I use is unique to its own user?

It is one universal API key I am using, for the service I’m paying for (its off Bubble).

Then I use my own API Key for that to make the calls.

It’s not a unique API Key per Bubble user, if thats what your saying.

The only dataset is being edited is the inital response from the API Call, it is being edited to the ID in the response (which is unique per request).

Nothing else is being changed though for the user… such as newImages which are sent to the callback URL.

I understand
But now what happens in the webhook case is that the user who triggers the endpoint is actually coming from the external server
Yes, the user clicks on the button and do the initial call to the endpoint
But, the endpoint then respond directly to your server … not the front-end user

Can you try doing this quick setup mentioned in the previous reply to help debugging the issue further?

can you check created by who?

Created by user’s email.

Sorry don’t want to post here and dox email, but current user’s email created it

Ok I will try to do this setup but it somewhat confuses me.

On Step 1:

Where do you want me to do a search for user?

Also, where do you want all of this to happen?

On the button click, backend workflow, or custom event?

Is this the table you’re creating the record when you receive the callback? create new image data?

Yes.

The newImages is where I am trying to send the images generated from response of callback.

But nothing is being sent there…

‘log’ is the response from initial API Call , it returns a unique ID in the response, so that part is going through since it is filling that data

backend workflow ‘image_gathering’

  • Step 1 create the debugging item
  • Step 4 make changes to step1

Okay, like this?



Yes
Can you fill the step one ‘logged’ field with ‘started’
And make changes in step 4 (count of images, finished at==current date’)

but it stopped filling the data in the latest records, if there’s something happened that caused all of those blanks on top?

Ok I edited it to this:


And Here is the result of what happens to those datapoints I get after doing button click on frontend:

Which is why I believe the backend not even getting triggered… nothing in it is functioning, no change to these datapoint

number of images == request data images count
finished_at == current datatime

i was just trying testing a different way, i forgot to change it back and forgot to fix to edit back to update that. no big deal there imo