Running into a wall with a action. I’ve been using GetRESTProxy for simple GET calls to our internal API for months without issue, but now I need to pass a custom Authorization header for a new endpoint. The moment I add the header configuration, the deployment validation fails with INVALID_FUNCTION.
Here is the code structure in the ASSIGN block:
SET restProxy = GetRESTProxy("POST", "https://api.internal.com/v2/auth/token", "application/json", {
"headers": {
"X-API-Key": "my_static_key",
"Content-Type": "application/json"
},
"body": {
"username": "test",
"password": "test"
}
})
If I remove the headers object entirely and just pass the body, it validates fine. But as soon as I introduce that nested headers map, it crashes. I’ve checked the Scripting reference docs, and the signature for GetRESTProxy definitely accepts a config object that should include headers.
I tried different syntax variations:
- Using quotes around keys:
"X-API-Key" - No quotes:
X-API-Key(though syntax usually requires quotes for strings) - Putting the headers inside the body object (which makes no sense logically, but worth a shot)
Nothing works. The error log just says INVALID_FUNCTION at the line where GetRESTProxy is called. It’s not a runtime error, it’s a compile-time validation error.
Is there a specific limitation on which headers can be passed via the proxy? Or is the JSON structure for the config object stricter than the docs imply? I’m stuck on this syntax. Need to know the exact valid format for passing headers in GetRESTProxy within a . I’ve restarted the browser, cleared cache, re-saved the . Same result. The function definition seems to reject the header map entirely.