Forum Documentation Showcase Pricing Learn more

Search by email with Data API?

#1

I’m trying to use the data api (https://bubble.is/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

#2

[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]

#3

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

#5

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