question

bhagyashree-more avatar image
bhagyashree-more asked ·

Webhook Setup Error: Invalid resource owner credentials

Hi Team 
I am getting "Webhook Setup Error: Invalid resource owner credentials " this error.Please help me out to solve this problem.

topic-default
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

ak avatar image
ak answered ·
Bhagyashree,

When you are subscribing to Webhooks using the UI in the developer portal ( App -> Webhooks ) the Webhook URL must respond with the Validation-Token immediately. Please read below.


Enable Webhooks using UI:

When you enable Webhooks using the UI as shown below, your app need not Create a Subscription via Webhook instead respond immediately with a HTTP 200 and a Validation-Token in the header.



The Glip-Botman code that you are referring to is creating subscription inside the application, instead please make sure that when you 'Verify' the Webhook URL would have the below code:
<?php $callbackBody = file_get_contents('php://input');
$callbackSignature = getallheaders()['Validation-Token'];
header('Validation-Token: '. $callbackSignature); http_response_code(200);  

Invalid resource owner credentials :

You do not have to provide User Credentials when you are creating the Webhooks using UI. As shown above, your webhook URL would need to respond with a HTTP 200 and the Validation-Token. 

If you are creating an application of Type == Server/Bot, then I recommend you go through this tutorial for more information:
http://ringcentral-api-docs.readthedocs.io/en/latest/glip_bots/

If you are using the Glip-Botman library please use the branch ' Bot-provisioner'
https://github.com/ringcentral/glip-botman/tree/bot-provisioner

Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

bhagyashree-more avatar image
bhagyashree-more answered ·
I try my level best but when I am trying to verify my webhook url it's showing verification failed msg.
I using ngrok. Can u guide me to run index.php from my local machine.
Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

bhagyashree-more avatar image
bhagyashree-more answered ·
Solved  Invalid resource owner credentials  problem but now It giving " WebHook is not reachable".
Is there any mistake in this code then please guide me. 



Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.