Skip to content

Instantly share code, notes, and snippets.

@asmaps
Last active December 7, 2015 17:09
Show Gist options
  • Save asmaps/be742e4834f29bb2babe to your computer and use it in GitHub Desktop.
Save asmaps/be742e4834f29bb2babe to your computer and use it in GitHub Desktop.
MyAX Webhook example

When a new text is generated MyAX will send a HTTP POST request to the webhook URL. It has a signature header to verify the integrity/authenticity and some data about the object and the text in the post data body.

Signature header

HTTP_X_MYAX_SIGNATURE: "sha1=47d5b4154bc4161aaf4279d127f1a52d64895da1"

The checksum is calculated as hmac sha1 hexdigest. The key is your API token. The message is the post data.

Post data

{
  "id": 9001
  "name": "<The name of the object>",
  "text": "<The new text (raw)>",
  "text_as_html": "<The new text (as html from markdown)>",
  "uid": "<The uid you put in the object>",
  "content_project_name": "<Name of the content project>",
  "content_project_id": 1337,
  "text_modified": "2015-10-21T23:29:00.000000+00:00",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment