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

HTTP POST/GET or REST API?

Hey!

So I've been trying to create a script that sends natural 20's/character death's and other events to a discord webhook/bot, but there doesn't seem to be a way to do HTTP POST/GET requests from within the sandbox. Then I searched around and found an reply from Riley:

"In an old thread someplace (I'm in a hurry right now and can't look it up) I already answered this, but basically the short version is "no, you will never be able to do network requests from our server inside the sandbox". However, the plan is to eventually offer a REST API which gives you GET/POST access to all of the same properties you can access using the current Javascript API, so you could easily access/modify characters, send chat messages to a running game, etc. So basically instead of using the JS API to make a request to your server, you would use your server to make requests to the REST API."

-https://app.roll20.net/forum/post/208063/ajax-not-ever

This was 5 years ago, is there any new updates to this?

July 20 (7 years ago)
Jakob
Sheet Author
API Scripter

No, and I don't think it will ever happen.

Damn, would love to atleast incorporate Discord Webhooks, for natural 20's or whenever a player kills something and have it announce in Discord.

July 21 (7 years ago)
The Aaron
Pro
API Scripter

So, people have gotten this working by creating a browser extension that scraps the chat.  If you're programming savvy, you could go that route.