Javascript API Permissions


(Ian Hirst) #1

Squiz Matrix 5.3.0

 

I have set up a javascript API to create links between assets. It works fine on a browser where I am logged into matrix. Following a successful call I receive the message:

 

link_id => 141114

 

So that's good.

 

When I log out of the matrix, or switch to an incognito tab and try the same thing again, I get...

 

error => You do not have permission to access this asset

errorCode => permissionError

 

My JS API asset is live and has Public read permission. My page assets and other javascripts are all live and have public read permission. 'Ignore permissions' is set to Yes on the JS API.

 

It appears that the JS API only works when a user is logged in. That really limits what can be done with it though! Can anyone help? I feel it's something really obvious.

 

Thanks.

 


(Nic Hubbard) #2

I think that you would have to give the Public User write permission to the assets that you want to link. 


(Ian Hirst) #3

That's the one, now it's working. It was something fairly obvious. Many thanks.