1

Apologies if this question has already been asked.

I have followed this guide to create a script that will bulk delete members from a specified Yammer group and I have this working perfectly.

The process used at the minute is obtaining a token for a user, then using that token to remove the user from the group, which takes two API calls.

My question is about "sleeping" to avoid tripping the rate limiter. On the documentation for the Yammer API rate limits (link) it states that "rate limits are per user per app".

In another stackoverflow question (link) it's mentioned that in this context, the user refers to the user token.

Since in my script, I'm only using a single API call per user token (to remove the user from the group), is it necessary implement a sleep to avoid tripping the limit?

I'm also wondering whether the API call to retrieve the token for a user may possibly trip the limiter since it's called using the admin token?

I've run a few tests removing 52 users from a group using a script without any "sleeps" and it completed successfully in around 27 seconds, just trying to understand why this didn't break the limiter.

Thanks in advance!

Community
  • 1
  • 1
Leonite
  • 41
  • 6

1 Answers1

1

is it necessary implement a sleep to avoid tripping the limit?

Yes, the admin user (or token if you like) could trip the limit in this case. To be on the safe side, that is, to avoid your app from being (manually or automatically) blocked, you shouldn't make more than request per second to Yammer endpoints that are categorised under "Other Resources". That's the Official guideline.

mr i.o
  • 952
  • 2
  • 10
  • 20
  • Thanks for the response, Could you clarify which call could trip the limit? The call which uses the user token or the call using the admin token or both? In the call with the user token, there is no connection to the admin token (and vice versa) – Leonite Jan 08 '16 at 10:05