I am not sure what’s happening. Are you sure you have defined the following variable
var TOKEN_URL = 'https://api.hubapi.com/oauth/v1/token';
If yes, make sure you don’t have “weird” characters that are added when you copy and paste the code.
Anyone else having this problem ?