Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
Create a free account

When is the api running?

So in my upcoming campaign I want the players to be able to access the campaign map even when we're not playing. Therefore I have set it up as a map in my roll20 game and I put an api script in my game that will allow players to switch between their current map and the campaign map. Will this work, even if no GM is currently in the game? If it won't, is there a way to make the api run if there's just players in the game?
The API starts running any time there is any player in the game, so they will be fine on that end. The only possible issue will be if there is an error and the API crashes, as only the GM has access outside of the game to restart it. 

Edited 1637241606
It crashes often and at random.  Sometimes it just doesn't start when a player joins and you need to restart it from time to time. If that happens they'll just have to PM and let you know. Sigh.  I run into this all the time with my games. 
Forum Champion
Marketplace Creator
API Scripter
The Aaron has written a script (API Heartbeat?) that can put a visual cue in the macro bar that will alert folks to an API sandbox crash. A player cannot see the API to restart it, but if they refresh the game (and are the only active player), they should be able to force a restart. Clunky, but workable. If there are no crashes though, yes, any player in the game will start the sandbox.
I tried precisely this, I employed Mapchange API, got it all setup, got about 5 sessions into a campaign, found major problems with mapchange not saving its own settings in the sandbox, reported the bug, The Aaron even logged in, poked around and said it was a serious bug with roll20 and nothing got fixed and I gave up and moved all of my offline activity over to discord servers.  R20 is just my battlemap screen sharer now.  The API constantly crashes anyway, to try and give your players access to it without any way to restart, it'd break within 20 minutes and require one.  
David M.
API Scripter
Re: api crashing, I don't really have an ongoing problem. I regularly run 4-5hr sessions without issue with 25+ scripts installed. Of course, most of what I run is command-driven as opposed to having a bunch of scripts listening to events, so that probably greatly reduces the chance for conflicts. So, YMMV.  I will +1 the new and improved APIHeartbeat  Keith mentioned. Turn the latency monitor off and you get a really low footprint and low overhead gauge in your macro bar.
Andrew R.
Sheet Author
I suggest you just move the Player Ribbon to the campaign map in between sessions and use it as the Landing Page of your game. That will work reliably.