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_TABLE
where the credentials should be stored in.APP_ID
is Instagram app id.APP_SECRET
is 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
.