CXone Studio Snippet INVALID_FUNCTION on GetRESTProxy

Hitting a wall with a basic Studio snippet. Trying to hit an internal auth endpoint to grab a token before routing the call. The syntax looks right based on the docs, but the execution log just spits out INVALID_FUNCTION and kills the flow.

Here’s the block:

ASSIGN:rest_proxy = GetRESTProxy("https://auth.internal/token", "POST", "Content-Type: application/json", '{"grant_type": "client_credentials"}', 5000);

I’ve tried swapping the string quotes for double quotes, removed the headers arg, even tried passing the body as a variable. Nothing works. The function name GetRESTProxy is definitely correct. Checked the spelling three times.

The error doesn’t give a line number, just stops dead. Is there a specific version requirement for this function? Or maybe a scope issue with the snippet context? We’re running the latest patch on the CXone tenant.

Just need to know if this is a known bug or if I’m missing some obscure syntax rule. The rest of the snippet works fine, it’s just this call that fails.