Skip to content

Webhook endpoint for IG APIs that persists mentions to the DynamoDB.

Notifications You must be signed in to change notification settings

muffin-rewards/lambda-ig-mentions

Repository files navigation

Lambda IG Mentions

Webhook for IG mentions apis.

Computes sha1 signature out of the raw body and app secret. If the signature matches the value of X-Hub-Signature header sent with the request, it makes a request to the IG mentions endpoint to gather more data about the media. Then it stores it into DynamoDB.

Deployment

To deploy for production, run npm run deploy:prod.

Environment variables

  • APP_ID is Instagram app id
  • APP_SECRET is token associated with app

Request

A request has to have X-Hub-Signature header in format sha1=${token}. It also has to have a query parameter promoter with promoter handle.

Response

If the signatures don't match returns 401.

If the promoter id is missing returns 422.

Any unexpected error returns 500.

If everything is ok returns 200.

About

Webhook endpoint for IG APIs that persists mentions to the DynamoDB.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published