• Resolved SOWHOYOUdotCOM

    (@sowhoyou)


    For some reason, this doesn’t seem to work as expected.

    Carrier: Webhook JSON

    Example of what does work…

    {
    	"content": "blah blah blah"
    }

    Example of what does NOT work…

    {
    	"embed": {
    		"title": "blah blah blah",
    		"description": "this ish",
    		"color": 9012344
    	}
    }

    Any Idea why that would not work, the json data is correct as I can send it normally outside of this plugin, but seems that with the “array” it doesn’t send.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    I have the same Problem with the plugin.
    Also the following valid JSON does not work:

    
    {
       "embeds": [
          {
             "title":"User Email",
             "description":"{user_email}"
          }
       ]
    }
    

    On sending the notification this results in the following JSON content (from debugging page):

    
    {
      "embeds": 
    }
    

    As this is no valid JSON the receiving server responds with HTTP Status Code 400 (Bad Request). Nevertheless, the plugin seems to think everything went well as there is no entry in the error log.

    • This reply was modified 4 years, 1 month ago by adminwbr.

    OK, got it working.

    In the plugin options, located at general, there is a option ”
    Empty merge tags – Remove unused merge tags from sent values”. As merge tags also use “{” and “}” I suspect any JSON object inside the outer JSON will be removed because it is considered to be an empty merge tag.

    Disable the Option and the JSON should be send fine.

    Thread Starter SOWHOYOUdotCOM

    (@sowhoyou)

    That did the trick, I swear I tried that before, buy hey thanks for posting the fix!

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Thanks for the catch! I’ll make sure the value is not being stripped when this option is active.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Webhook JSON Bug’ is closed to new replies.