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

A question about API access

Hello.  I'm not sure if this is the right forum for this question, but, I've been mulling over whether to upgrade to pro account for API access.  My question for those who use it, if I run most of my games as "theater of the mind" and primarily use Roll20 for character management (PC, NPC, "monsters") and "fancy dice roller" is pro account worth it for the API access?
1596980839
GiGs
Pro
Sheet Author
API Scripter
It's difficult to be sure without knowing exactly how you run games. But the API does make character management a lot easier, and you can do very fancy dice rolls with it but that requires learning some syntax. (Power Cards API is great here.) If you're considering signing up, I'd recommend trying it for one month, check out the one-click library you'll have access to and see if there are any scripts that that you fancy. Whether you sign up or not, you can also post here about specific  things you are doing already and ask if there are any scripts to streamline that process. We can tell you.
I have pretty extensive background with both front-end and back-end JS development, so writing a new script is not an issue for me.  I guess my question is more about the capabilities of the API.  In fact, perhaps my first and only question should be: is the API documented thoroughly?  If so, where can I find the documentation?
1596983476

Edited 1596983635
GiGs
Pro
Sheet Author
API Scripter
Have a look at the wiki pages for the API - they are the best documentation. It is fairly thorough. Having JS skill is an advantage to be sure, but my advice was more geared at exploring what already exists. For most purposes, you shouldnt need to write your own scripts. There are already hundreds of existing scripts covering many different purposes. Taking a different angle: post the kind of things (specific things, not vague generalities) you want to use the API to streamline, and we can tell you (a) if existing scripts exist to do that, and (b) if you can write scripts yourself to do that when existing solutions dont exist. Note that the answer to (b) is usually yes.  The main failing of the API is you have limited access to the roll20 interface itself - script feedback and controls have to be handled through chat mostly. But beyond that, you can do a LOT.
Thank you.  Can you link the wiki page?
1596983697
GiGs
Pro
Sheet Author
API Scripter
I always find it by typing "roll20 wiki api" in google, lol. Here's you go: <a href="https://wiki.roll20.net/API:Introduction" rel="nofollow">https://wiki.roll20.net/API:Introduction</a>
1596985022

Edited 1596985076
Thank you for the quick response!&nbsp; For posterity's sake, this seems to be the actual API documentation page (linked from the wiki page):&nbsp; <a href="https://roll20.zendesk.com/hc/en-us/articles/360037256714-API" rel="nofollow">https://roll20.zendesk.com/hc/en-us/articles/360037256714-API</a> . And, here's one specific question about the API's capabilities I have.&nbsp; Is the compendium exposed to the API?
1596987471
GiGs
Pro
Sheet Author
API Scripter
The zendesk page is the official documentation. But the wiki is nearly always better, because it includes everything from the official documentation and also user contributions. There might be a lag when new things are added to the zendesk site before they appear on the wiki, but roll20 aren't exactly fast when it comes to documentation (a decent amount of the "official" documentation is sourced from the volunteer site, too!). I honestly dont know about the compendium - thats one thing i havent done anything with. Hopefully Aaron or Scott or some others will see this question.
1596997209
Jakob
Sheet Author
API Scripter
The API doesn't have compendium access as of last time I checked. I imagine it never will due to IP considerations, e.g. a script that produces the whole compendium in downloadable form would probably get Roll20 into dangerous territory w/r/t their agreements with publishers.
1596997543

Edited 1596997734
GiGs said: The zendesk page is the official documentation. But the wiki is nearly always better, because it includes everything from the official documentation and also user contributions. There might be a lag when new things are added to the zendesk site before they appear on the wiki, but roll20 aren't exactly fast when it comes to documentation (a decent amount of the "official" documentation is sourced from the volunteer site, too!). Thank you for that info. Jakob said: The API doesn't have compendium access as of last time I checked. I imagine it never will due to IP considerations, e.g. a script that produces the whole compendium in downloadable form would probably get Roll20 into dangerous territory w/r/t their agreements with publishers. I don't quite understand this argument.&nbsp; You would certainly have the same access restriction you would normally have with compendium if you were to be able to access it through the API - at least if designed correctly.&nbsp; If you're worried about someone copy pasting data, you can already do that if you wish accessing it normally.
1596997959
Jakob
Sheet Author
API Scripter
aisforanagrams said: Jakob said: The API doesn't have compendium access as of last time I checked. I imagine it never will due to IP considerations, e.g. a script that produces the whole compendium in downloadable form would probably get Roll20 into dangerous territory w/r/t their agreements with publishers. I don't quite understand this argument.&nbsp; You would certainly have the same access restriction you would normally have with compendium if you were to be able to access it through the API - at least if designed correctly. The thing is that a script with access to the compendium could just copy the whole thing in batch, which manual input can't do. Even if you have bought, say, the D&amp;D Player's Handbook, I imagine that Roll20's license does not extend to giving users a downloadable version of it. Now, could a Chrome extension not do the same thing? Probably yes, but I guess the idea here is that Roll20 would like to uphold that they don't actively enable the user to copy the compendium in bulk, not that it's impossible. Alternative, more cynical explanation (which I don't think is the main reason): new features often (not always) take some time to be properly supported in the API - sheet workers still aren't 100% supported. I don't think the API is any sort of priority for Roll20.
1596999248

Edited 1596999908
Jakob said: The thing is that a script with access to the compendium could just copy the whole thing in batch, which manual input can't do. Even if you have bought, say, the D&amp;D Player's Handbook, I imagine that Roll20's license does not extend to giving users a downloadable version of it. Now, could a Chrome extension not do the same thing? Probably yes, but I guess the idea here is that Roll20 would like to uphold that they don't actively enable the user to copy the compendium in bulk, not that it's impossible. Sorry to keep pushing back on this point, but if this really is their argument against such a support, I find that a fairly weak argument.&nbsp; Like you said, it would be relatively easy for anyone with modicum of scripting experience to write a simple scraper in matter of hours. Having API access to compendium wouldn't make that any easier. Your alternative theory, is a bit more disconcerting to me as a potential customer for that product (Pro subscription) since if Roll20 considers API an afterthought, that's a pretty glaring disincentive. Anyway, I'm coming at this from perspective of someone that is considering an upgrade and I hope I am not coming off as being combative.&nbsp; I just don't like the idea of Roll20 as a company either having what seems to be pretty flimsy excuse for not supporting a feature that could be quite useful or, worse,&nbsp; ignoring one of their main product offerings for premium account holders. EDIT: Having said all that, not having access to compendium wouldn't necessarily be a dealbreaker for me.&nbsp; But, their attitude towards it would certainly inform my decision.
1597000402
GiGs
Pro
Sheet Author
API Scripter
aisforanagrams said: Sorry to keep pushing back on this point, but if this really is their argument against such a support, I find that a fairly weak argument.&nbsp; Like you said, it would be relatively easy for anyone with modicum of scripting experience to write a simple scraper in matter of hours. Having API access to compendium wouldn't make that any easier. You're pushing back against a fellow user. Jakob doesnt have any influence over how the system works. Yes, there are ways to bypass their restrictions, but roll20 clearly considers it important to be able to demonstrate to publishers they can trust them to protect their intellectual property.&nbsp; And so Roll20 definitely locks down things to stop people sharing them. Personally I think roll20 is too heavy on its anti-'piracy' (sharing) stance, but the fact I dont like it doesnt change what it is.&nbsp;
1597000665

Edited 1597001227
GiGs said: You're pushing back against a fellow user. Jakob doesnt have any influence over how the system works. I obviously understand this.&nbsp; I'm voicing my opinion on speculations on Roll20's policy as a consumer of their product.&nbsp; It's not intended to be a personal attack on Jakob.&nbsp; I'm aware of the pitfalls of online communication, and so I was trying to make that clear in my response - though perhaps not clear enough. EDIT: My first error may have been in using "you" in my original response to Jakob - where the "you" was used as one would use "one" and not a reference to Jakob themselves.
1597003880
Jakob
Sheet Author
API Scripter
No worries! Disclaimer that everything I'm saying is speculation, I'm not aware of any official statement on API-compendium integration.
Jakob said: No worries! Disclaimer that everything I'm saying is speculation, I'm not aware of any official statement on API-compendium integration. Yep, understood.&nbsp; Thank you!