hello! I'm trying to include the snippet at the end of this post in the body of a resource query to a rest API. I've tried defining additionalScope using a js query and then putting the variable as the body in the resource query as mentioned here, but when i try to execute i get the following error: 'postMessage' on 'Window': URLSearchParams object could not be cloned.
I also tried using json.Stringify and wrapping the whole thing in parentheses, while this takes the error away, i check the output of the request and i see that an empty {} is being sent as the additionalScope variable i set up when i do this. Here is the body I am trying to send:
body: new URLSearchParams({where: ‘xxx in xxx’})
Lmk if anyone can help with a solution!