I try to fetch a refresh token for my alexa smarthome skill. For this I'm using the following command ask util generate-lwa-tokens --client-id <client_id> --client-confirmation <secret>
The outcome is a Http 400 with "localhost is not whitelisted". The message points to adding the url under Web Settings-> return url.
However there is so such option in the Alexa developer console.
400 Bad Request The redirect URI you provided has not been whitelisted for your application. Please add your redirect URI in the 'Allowed Return URLs' section under 'Web Settings' for your Security Profile on Amazon Developer Portal.
The place where I can add a return urls is in the Amazon developer console under Security profiles. But I don't see a way to connect this profile with my alexa skill.
My question is, how to get a refresh token for an Alexa skill. The idea is to use this token for automated testing.
Usually when that error message occurs, it means that the deviceInfo::productId value in AlexaClientSDKConfig.json does not match the corresponding value from the AVS developer console.