Search by email with Data API?

I’m trying to use the data api (https://bubble.io/reference#API) to update some rows in my Bubble database from an external source, but I can’t seem to search a table by email address.

In the API you are able to filter rows via a constraint. For example: hitting the url https://myBubbleSite/api/1.1/user with the constraint { key: "active", constraint_type: "equals", value: "yes" } will return all the users with “active = true”.

However, I can not figure out a way to search by the user’s email address. If I return any user row I can see that the email address is contained inside an “authentication” object:

{
  "Created Date": "2018-02-20T22:07:26.360Z",
  "Modified Date": "2019-03-06T19:07:14.747Z",
  "authentication": {
    "email": {
      "email": "blah@email.com",
      "email_confirmed": true
    }
  },
  "firstname_text": "Blah",
  "lastname_text": "Blahston",
  ...
}

But I can not figure out how to craft a constraint to target it. Anything I do with { key: "email"... } or key: { "authentication" } just seems to 404. Is there a way to search by email?

Thanks

3 Likes

[Bump! By the way, is there anywhere else I could ask questions like this - it’s a bit niche, and I don’t think anyone here is using this functionality, so probably can’t help]

if it works with “active = true” , then create another email field (a copy) “email2 = search_email”. Just an idea.

I’m facing the exact same problem… Did you find a solution?

Hey,
I’m in also having problems with this.
Did you find something ?

@sylvain.legleau I solved it by saving the email in another text field (email_key) at signup. Not elegant, but it works…

I solved this by checking all the fields, assuming that the email is unique you should get a valid response :
{ key: “_all”, constraint_type: “equals”, value: “johndoe@gmail.com” }

6 Likes

Anyone find a solution to this? While _all should work it seems suboptimal…

I’m facing the same problem, I need to search through an N8N node, all users where the email will be the search field, when you do ANYTHING, to get to the email, I get a 404 error back

Both dotNotation and dynamic expression (which returns the email field correctly), the 404 comes.

I agree with the solution given above that creating a secondary field works, but it is IMPOSSIBLE that there is no way to access such a vital field, just to LOOK

Anyone who knows, for the love of God help me…lol