Global Stop all Playing via URL? - RESOLVED

Hi,

I’m using HTTP get Requests to control the Sounds. For Example:

https://www.syrinscape.com/online/frontend-api/moods/329/play/?auth_token=xxx
or
https://www.syrinscape.com/online/frontend-api/moods/329/stop/?auth_token=xxx

I’m wondering if there is an URL to stop ALL Sounds, like the top Stop Button in the offical Web GUI ?

best regards

Daniel

1 Like

@flaedda Please try this link:

https://www.syrinscape.com/online/frontend-api/stop-all/?auth_token={AUTH_TOKEN}

1 Like

Hi, i tried the link you suggested but i get an Error:
Forbidden (403)
CSRF verification failed. Request aborted…

I’m using the REST functions from Maptool to do the Call.
Calls for playing or stopping Moods working fine this way.
The error only occours for the “stop-all” call.

best regards Daniel

Did you put your OWN auth token in at the end?

It works form me when I do that. :smiley:

Hi Benjamin,

yes, I did put the token there. The Stop link works fine for me if I put it in a Webbrowser. But it didn’t work as a rest call from within maptool.

I think your webservice require a Referer-Header for the “online/frontend-api/stop-all” call (Like the error message says). All other calls like “online/frontend-api/elements/123/play” didn’t require a “Referer-Header”.

Therefore all calls beside the “stop-all” call works fine for me, when I call them with the Maptool REST function.

This is the error I get on my Request:

CSRF verification failed. Request aborted.

You are seeing this message because this HTTPS site requires a ‘Referer header’ to be sent by your Web browser, but none was sent.

This header is required for security reasons, to ensure that your browser is not being hijacked by third parties.

If you have configured your browser to disable ‘Referer’ headers, please re-enable them, at least for this site, or for HTTPS connections, or for’same-origin’ requests.

Hi,

I changed the REST request from POST to GET. With GET it is Working :slight_smile:

best regards

Daniel

1 Like

Useful info is useful!

Thanks @flaedda :beers: :pizza: :trophy: