Skip to main content

Hello all -

I am in the process of setting up a series of Tray.io webhooks to enhance gamification in our Community, but running into a small issue.

In order to check what badges a user has, I am using a get request /user/{id} which returns user information, including a list of badges that they hold. However, the information contained in this get request seems to updated infrequently.

As an example, if I award a badge via a webhook (or manually), I can see it within the Community immediately by checking the user profile. The backend definitely recognizes that the badge has been awarded, and API calls to remove the badge function normally. However, the get user request does not update this information in real time - I haven’t been able to determine the exact lagtime yet but it seems to be at least 30 minutes.

Is there a better way of getting realtime information of a user’s badges through the API?

Thanks,

Tyler

Calling on gamification gurus ​@DannyPancratz and ​@olimarrio if you have any insight 🙂


Interesting and good to know (we use that API of a key integration as well). 

I don’t know of any better ways to get the information; that’s the best API route I’m aware of. There really should be an API call for get a specific user’s badges…

Good luck! 


Thanks for your quick response Danny. It’s definitely unfortunate that the API doesn’t support a get request for badges of a single user. 

As adding significant (30+ minute) delays into my workflow isn’t very feasible, I suppose I’ll have to proceed under the assumption that the user information returned from this get request is not always up to date.


Hi ​@tnelson 👋,

I cannot think of a better way of getting this badge data right now. I’m in conversation with our engineers about the reason for this lag time and what the best route forward is. I’ll update you as soon as I have more information.


@tnelson I had a use case for this same API and thank to this post, I tested and saw the same 30+ minute delay. 

Edit: I also saw the delay on the find user by field / value endpoint /user/{field}/{value}

Original post

 

This doesn’t help your use case, but...

 

I tried the find user by field / value endpoint /user/{field}/{value} and saw immediate updates on the data I was testing (number of topics). (Edit: Not immediate, I must have just timed it whenever the data sync happened)

 

But, alas, badges are not included in that data. 

 

@olimarrio as you talk to engineers, is there a reason why the response payloads are different for these two calls? Ideally, they’d be the same. (Edit: less important, but it is still curious)


@olimarrio & ​@Julian if there’s an internal eng ticket around making this data available in real-time, can I please be added as someone to inform if/when it changes? 

Due to the delay, I’m going to build my use case (checking # of topics) to be on when a user has zero topics. That way it’ll add the custom role and trigger the email (about their first post) immediately without an odd delay. But, obviously, a change would break my automation. 


Reply