CXone Studio Snippet: INVALID_FUNCTION on GetRESTProxy call

Hit a wall trying to hit an internal endpoint from a Studio snippet. The goal is simple, fetch some data based on the caller’s ID. But the script bombs out immediately with an INVALID_FUNCTION error.

Here’s the exact code block I’m using:

var proxy = GetRESTProxy();
var url = "https://api.nice-incontact.com/api/v2/interactions";
var result = proxy.GET(url, null);

I’ve checked the docs and the syntax looks right. The function name is correct, it’s capitalized properly. The error points to line 1. Not sure if I’m missing a namespace import or if the function signature for GetRESTProxy changed recently. Anyone see what’s wrong here?