The first question is whether XSRF cookies are even an appropriate
security mechanism for your case. You need XSRF cookies when your
authentication is cookie-based, which it is for traditional web apps,
but generally not for APIs used by non-web clients. Purely
javascript-based apps can go either way. If you are using cookies for
authentication, you'll need to provide the xsrf token either in the
initial page load or as a separate api call. The separate api call
could be a simple as a handler that does
"self.write(dict(xsrf_token=self.xsrf_token))" and then the javascript
would save the value it receives as a cookie named "_xsrf".
-Ben