Skip to main content

How to retrieve a MemberStack user ID by custom field value using their API despite console errors?

Hi,
Is there a way to get a MemberStack user ID by a value in their custom field for example using your API somehow?
This would be for a situation in which we wouldn’t have access to their email nor Memberstack ID .

5 comments

  • Ben Sabic
    Ben Sabic

    Hey Chuck!

    As far as I know, that isn't possible at this time. What you are looking for / need is the ability to "filter" the results when using the List Members API endpoint, with a query parameter in the URL. I'm afraid that can't be done at the moment with the API.

    One way you could do it currently is retrieve all your members, storing them in an array, and then filtering that.

    cc: Tyler Bell

    0
  • Tyler Bell
    Tyler Bell

    Ben’s correct. There’s no native way to do that.

    For performance and efficiency, I recommend building your app logic such that you can always retrieve a member by their ID.

    0
  • Chuck Lapointe
    Chuck Lapointe OP

    Thanks both!

    0
  • Ivan Throne
    Ivan Throne

    I am getting a console error on loading the Memberstack API script. Is there a current issue?

    0
  • Raquel  Lopez
    Raquel Lopez

    Hello, where did you get this import script? It's using the wrong source URLIt should be something like. With the right app id

    <script data-memberstack-app="app_..." src="https://static.memberstack.com/scripts/v1/memberstack.js" type="text/javascript"></script>
    

    You should obtain your corresponding import script in your Memberstack dashboard settings

    You should NEVER use the admin api in your frontend 🙅
    0

Please sign in to leave a comment.

Sitemap