Error Message when trying to post to Cliq

Error Message when trying to post to Cliq

I'm calling a function to message a person in Cliq, but I'm getting this error:

{"code":400,"data":{"error_key":"error.invalid.useraccess","error_code":9006},"status":"FAILED"}

However when I edit the function and click 'Save & Execute Script' I get a success message:

Re
sponse: {"status":"success"}

Cliq User:  m*****@j*****s.com
Response: {"status":"success"}

Exact same Cliq user was used for both attempts. Here is the code I used:

msg = "Testing for testing purposes";
cliq_user = " m*****@j*****s.com ";
response = zoho.cliq.postToUser(cliq_user,msg);

Does anyone have any idea as to why his is happening and how to fix it?