Try access gallery API from other project


#1

Hi, I am trying access api from other web application (via javascript) but I have permission problems...

I can access a list using only Authentication Basic

But to generate as thumbs or view the image, I can not access. Returns {"message": "CSRF verification failed"}

I noticed that I need to enter a parametric "requesttoken"

My question is ... how to generate this token?

Thank you!


#2

You can get the token with OC.requestToken in JS code


#3

Need to make all my interactions through ajax.


#4

I only have login and password
And Basic Authorization with btoa('login:password')