<#assign qry = "SELECT id FROM images WHERE visibility = 'public' AND owner.id = '100' limit 1" />
<#assign response = (restBuilder().asIdentityUser('/users/id/100').liql(qry).data.items[0])!{} />
response user 100 image = ${response.id}
I am getting a permission error. If I remove "asIdentityUser('/users/id/100')", then it is working fine. I am testing this endpoint code in incognito mode.
It is complaining about some permission issue when I test it in incognito mode.
Any ideas? The logic is fetch user 100's public image, run the api as user identity 100.