JS API integration with React JS


#1

Hi,

The JS API method is giving me permission error as below:

I’m trying to integrate this with React and declaring variables as:
const options = new Array();
options[‘key’] = ‘1045615854’;
const js_api = new window.Squiz_Matrix_API(options);

Can someone please let me know why I’m getting this error even though I’ve created the page. If I use another asset id, it provides me the required attributes, but not just for this id.
Thanks.


(Bart Banda) #2

First, make sure you do have read access to that asset as the user you are doing the JS API request with.

Secondly, make sure it’s under a root node where the JS API has acccess to (is under the Root Nodes restrictions set on the Details screen of the JS API).