question

Dilip Mishra avatar image
Dilip Mishra asked Phong Vu commented

{"status":"error","message":"Your request was accepted, however a post was not generated","error":"Invalid Custom payload: no supported fields","validation":[]}%

I am tring to use incoming webhook for spotinst however when i try to test my team channel via curl :

curl -H 'Content-Type: application/json' -d "{\"text\":\"testing\"}" my-incoming-webhook-url I get

{"status":"OK"}%


And also I get the testing in in my group but when we try the real message which is send by spotinst i get error for ex.

curl -X POST -H "Content-Type: application/json" -d '{

"subject": "spotinst:notification",

"message": "{\"accountId\":\"act-account-id\",\"resourceId\":\"smi-smi-id\",\"organizationName\":\" organization.\",\"trigger_policies\":\"[spot-Instance Launch Issues]\",\"accountName\":\"account name\",\"resourceName\":\"resourcename\",\"title\":\"Stateful Resume Completed\",\"message\":\"Stateful resume action completed successfully. Instance Id: instanceid. Instance Type : c5.4xlarge. Lifecycle: SPOT.\"}"

}' my-incoming-webhook-url

ERROR:


{"status":"error","message":"Your request was accepted, however a post was not generated","error":"Invalid Custom payload: no supported fields","validation":[]}%



webhooks
1 |3000

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

Phong Vu avatar image
Phong Vu answered

Where did you learn the syntax {"subject": "..."...}?

Here is the example of valid json keys

{
  "activity": "Force Alerts",
  "iconUri": "https://example.com/force.png",
  "title": "1 force alert",
  "text": "Be mindful of the force"
} 
1 |3000

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

Dilip Mishra avatar image
Dilip Mishra answered Phong Vu commented

Hi Phong Vu !!

Actually the logs are send in the same syntax as I mention above by Spotinst with whom we have tie up to manage our spot servers , their json format is supported by other glip channels like slack etc but not by RC.

1 comment
1 |3000

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

You have to convert it to the RingCentral Team Messaging (GLIP) syntax.

What do you mean ". by other Glip channels like Slack"? Glip is Glip and Slack is Slack.

0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys