I already created an API key so I know that is not the problem. I get a 401 error code when I run my script. My guess is that I need a premium Jira account in order to use the function below because I think it might fall under global and multi-project automation.
Disables the specified user account. The permission to make use of this resource is exposed by the
lifecycle.enablement privilege. You can optionally set a message associated with the block that will be shown to the user on attempted authentication. If none is supplied, a default message will be used.