Kassimo wrote:Hello, I have a question. If several people in a region wish to carry out a recruitment campaign via API automated telegrams, should we all use the same API client key (I already have one for the region), or do we each need our own client key?
A region can only have one client key. Per the
Telegram API docs:
the API docs wrote:API Client Keys are tied to a particular region, and each region may only have one (although they can be revoked and re-issued). Multiple people and scripts within a region can use the same API Client Key. If they do, they will be bound by the same rate limit: that is, when anyone uses the API Client Key to send a recruitment telegram, no-one else using the same API Client Key will be able to send more messages until the rate limit expires.
Kassimo wrote:And I presume, either way, we would all use the same TGID to send out the same telegram.
Don't do that. The API docs say:
the API docs wrote:Never share your telegram's Secret Key, as this will allow others to send your telegram to the recipients of their choice. You are responsible for all usage of your keys.
Besides, the telegram will always appear to be sent from the nation that created the TGID and secret key.
Kassimo wrote: If several people are recruiting for the same region, how do we avoid exceeding the API rate limit? (If it makes any difference, we will be using PyNS.)
If I'm not mistaken, exceeding the API rate limit has no penalty except that you will not be able to send telegrams until the rate limit expires. Again from the docs:
the API docs wrote: If you attempt to send telegrams faster than this, your request will fail, and the response will include a 'X-Retry-After' header with information on when you can try again successfully. There is no penalty for trying too soon, although each request does count toward your overall API Rate Limit.
I don't know what effect this has on PyNS, though.