This is a follow up to my question about /service that was forwarded to this group from sage-support.
Is the websocket service also restricted? I've been able to successfully connect, send a simple code request, and receive a calculation result in the following two ways:
1) Using the python script
2) Using a command-line websocket client
But when I try using some basic JS, I get a 403 response.
// JS code
const response = await fetch('
https://sagecell.sagemath.org/kernel', {
method: 'POST',
body: '{"accepted_tos": "true:}',
headers: { 'Content-Type': 'application/json' }
});
const data = await response.json();
const full_url = `${data.ws_url}kernel/${
data.id}/channels`;
const socket = new WebSocket(full_url);
// ^^^^ this line fails with 403 response from server
Any guidance would be appreciated.