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 .
×

API Scripting Functionality

1785290744

Edited 1785291002
Hello Roll20 Staff, Lately I have been implementing macros, using TokenMod, to streamline combat in my games (DND 5e). I am using an API script to operate a macro that shows a creature's AC and movement speed when I hover over the token. The problem I am having is that this tooltip is visible to everyone. I do see that there is a " GM only " box next to " Show " in the token settings. However, it seems that the " GM Only " checkbox is not exposed to the Roll20 API. None of the scripts I use can seem to check or uncheck that specific box. Considering that the " GM Only " checkbox was added in February of 2025, I was wondering if there are plans to implement its functionality in the Roll20 API? It undermines the convenience of the macro if I have to open each token individually and manually check " GM Only ". I am fairly new to using macros and API scripting so if I am misunderstanding the functionality please let me know.  Thanks for your time.
1785328980
Andrew R.
Pro
Sheet Author
Doesn't this work for you?  !token-mod --on gm_only_tooltip It works for me with TokenMod v0.8.88 GM Chair said: However, it seems that the " GM Only " checkbox is not exposed to the Roll20 API. 
I forgot to include the first underscore between "gm" and "only". I can't believe I missed that! Thanks so much for your help.
1785373952
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
When checking API documentation, it's usually a good idea to check both the Help Center and the Wiki. The documentation of recentish objects are spotty.
That's great advice, thank you! I will keep both of those resources handy in the future.