Weird as this may be - might still help someone. If switching from 1st gen to 2nd gen, give it a bit of time before trying to hit the API. OR if deploying for the first time too, giving it time can help.