Action : Limit the number of tokens per minute distributed

Hello,

Following the arrival of the “Action” part, we would like to set up a new “Custom Actions” to limit the number of tokens distributed every minute.

I am a beginner in this type of configuration and I have a lot of difficulty in building this request.

Do you have an idea?

I started my request like this:

exports.onExecutePostLogin = async (event, api) => {
  if (event.connection.id == ('') && event.transaction.protocol:) {
    api.access.deny(`Access to ${event.client.name} is not allowed.`);
  }
};

Thank you in advance for your help.

Hey there!

As this topic is related to Actions and Rules & Hooks are being deprecated soon in favor of Actions, I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!