@codesections @gcupc I can't remember exactly what I did, but I based my code on mastodon.js (https://github.com/Kirschn/mastodon.js/blob/master/mastodon.js) and you can see how I did it in Pinafore here: https://github.com/nolanlawson/pinafore/blob/fc46835decdab0dbadaa9ea25f0edd9a249c49e2/routes/_api/oauth.js
Just glanced at your code, but is "read:favourites" actually a thing? I thought the only scopes were "read", "write", and "follow". https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md#registering-an-application