News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Cannot access tokens to integrate webhook in developer sandbox account
Tags: rest api
Apr 25, 2020 at 1:33am   •   1 replies  •  0 likes
snehal sutar

I am trying to integrate glip webhook in my SharePoint online/office 365 modern page,I have developer/sandbox account and created sandbox app.trying to post messages via a glip webhook.How i can access token to call/use API??

1 Answer
answered on Apr 25, 2020 at 8:20am  

You don't need an access token to post a Glip webhook message. However, if you don't know your Glip Webhook address and want to detect it programmatically, then you can login your app and call the glip/webhooks endpoint to get a list of webhooks addresses.

To post a message to a Glip Webhook, read this blog for details on how to set it up and use any http POST request to send.

Here is some snippet code to post a message in Node JS, provided that you have the webhook_url

function post_message_to_group(){
  webhook_url = "https://hooks-glip.devtest.ringcentral.com/webhook/v2/f4baa67a-xx"
  var https = require('https');
  var url = webhook_url.replace("https://", "")
  var urlArr = url.split("/")
  var host = urlArr[0]
  var path = url.replace(host, "")
  var body = {
    "icon": "http://tinyurl.com/pn46fgp",
    "activity": "Beer consumed",
    "title": "Let's stop working and go to WaterDog to have a bear.",
    "body": "This is the body of the post"
  }
  var post_options = {
      host: host,
      path: path,
      method: "POST",
      headers: {
        'Content-Type': 'application/json'
      }
  }
  var post_req = https.request(post_options, function(res) {
      var response = ""
      res.on('data', function (chunk) {
          response += chunk
      });
      res.on("end", function(){
        console.log(response)
      });
  });
  post_req.write(JSON.stringify(body));
  post_req.end();
}

 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us