alexa/alexa-skills-kit-sdk-for-python

ask util generate-lwa-tokens Not Recognised

goochi1 opened this issue · 7 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ x] Other... Please describe:

ask util generate-lwa-tokens Not Recognised

Expected Behavior

To be able to get an auth token for ASK pythin

Current Behavior

this documention:https://developer.amazon.com/en-US/docs/alexa/smapi/get-access-token-smapi.html
is telling me to run ask util generate-lwa-tokens but i am getting a command back saying
'Command not recognized. Please run "askx util" to check the user instruction'

Python version info

  • Python version 3.6
  • ask-cli@2.0.1

Hey @goochi1 , thanks for raising this bug. ASK CLI released a major version (v2) last week, and refactored some of these commands. We will check with CLI to figure out the alternatives. For now, you can use the ASK CLI v1 to get the access token. Please let us know if you have any issues.

Hi @goochi1 ,

Please track the issue at alexa/ask-cli#119. We just create this issue to make sure it will be addressed.

Thanks,
Ron

Thanks! the main AWS docs are incorrect too. glad i wasnt being an idoit :)

Thanks! the main AWS docs are incorrect too. glad i wasnt being an idoit :)

I think you meant the Alexa docs. Yeah, the CLI team will work with the documentation team to fix that as well. Thanks for pointing it out.

Hi I tried uisng the original command and it still does not work. I also tried to find an update in the documentation but i can't see a change. Can you help please?

@goochi1 can you please let us know what did you try? I could get my LWA credentials using both ASK CLI v1 and v2.

Here is what I tried :

  • Using ASK CLI v1

    • I just installed ASK CLI version 1.x by doing npm install ask-cli@1.
    • Check the CLI version using ask --version.
    • Tried ask util generate-lwa-tokens, after setting up a security profile following the steps mentioned here.
    • Used the client id, client secret and refresh token to create a simple smapi client as mentioned in the docs, and could hit any SMAPI API.
  • Using ASK CLI v2 (@RonWang fixed this in the v2 new version)

    • Installed v2 by upgrading CLI npm install --upgrade ask-cli.
    • Check the CLI version using ask --version.
    • Configured the CLI using ask configure. Refer this doc for more details.
    • Use ask util generate-lwa-tokens similar to how we set it up for v1, get the credentials and go ahead from there.

Please try either of the approaches and let us know if you are still facing issues, with the reproducible steps. Thanks.

@goochi1 , I hope you were able to get this working. I am closing this issue. Please reopen with further information if you are still facing problems. Thanks.