Exchanges short-lived token for long-lived one and fetches IG handle and saves it along with the token to a DynamoDB.
To deploy for production, run npm run deploy:prod.
PROMOTERS_TABLEwhere the credentials should be stored in.APP_IDis Instagram app id.APP_SECRETis token associated with app.
Request body should include stringified JSON of following format:
{
token: String,
id: String,
handle: String
}
If token is not valid, then returns 400.
Any unexpected error returns 500.
If everything is ok returns 200.