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.
To deploy for production, run npm run deploy:prod
.
APP_ID
is Instagram app idAPP_SECRET
is token associated with app
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.
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
.