Accessing the Syrinscape API with javascript


Hi guys

I already wrote @benjamin about this, but I decided to write in here, as maybe someone else had the same problem and already solved it.

I am currently trying to build a remote control for Syrinscape, that I can integrate into foundryvtt (, therefore I am trying to access the API with javascript.
While I can get the play and stop functions to run without problems, I cannot read from the API remotely.

Here is my basic fetch command (replace AUTH with the Auth token)

.then((response) => {
return response.json();
.then((data) => {
generates an error:

“Access to fetch at ' from origin ‘’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.”

when I now set the mode to no-cors, i only get the opaque response with no data in it.
Can anyone point me the right way, so I can access the API from a 3rd party script?

Thanks in advance.


@sonofconan Any thoughts?


When I route the request through a CORS Proxy like: I can access the data just fine


I might have found a workaround. i can build all the links I need when I have the Auth key and the information provided in syrinscape_remote_control_links_Sven_.csv
Either i can use the public version, or I have to do regular updates of my scripts manually.
A Public version would of course be easier :slight_smile:


I’m really glad someone’s building this! I’ve been putting sound links I want to use in journal entries and individual macros manually, and that works well for a scene or very often used sounds. But, I’d prefer something purpose-built in the long run.


It’s my first foray into proper coding. But i managed to parse the csv. So I might get a prototype running soon.


I’d be happy to help test if you need a guinea pig.


I hit a small milestone today. I managed to create a module that reads in the csv and outputs the values to the console.
Not much but baby steps :smiley:


Im super interested in this and your work here.


I was a bit busy the last few days, so I didn’t make much progress. I will have some time off soon though and I plan to use that to continue on the module.

Just keep in mind that this is only a remote. It won’t be able to pipe audio into fvtt directly. That would need a way to add your own player and AFAIK this isn’t planned yet.


Small Update:

I got the Parsing off the CSV down, now I need to create the control menus from that data:

  • Using Categories as filters for Soundsets
  • Using the Soundset as Filter for Moods
  • Generating the Links for each Mood
  • Generating a Stop Button (I think I need to use the Silence Soundset for that)
  • Building a nice Menu around all that.

I would also love to find a way, so i can add the Soundsets to Journal Entries and the like in order to start them Quickly.

I shall keep posting updates here.


Thanks for the update @chrome it’s looking really promising :slight_smile: