question

Steven R Forman avatar image
Steven R Forman asked

curl assistance for login "code" and token

What exact curl commands can be used to automatically get the "code" from a curl re-direct Url? I am able to do this manually in 2 steps according to Miguel Mota's blog entry at: https://miguelmota.com/blog/alexa-voice-service-authentication/ However, surely if cookies and re-directs are enabled, then getting the "code" and "token" should be able to be combined in one shell script. So far, this is my latest unsuccessful attempt which is still replying that cookies need to be enabled. AUTH_URL=" https://www.amazon.com/ap/oa" AUTH_DATA="client_id=${CLIENT_ID}&scope=$(echo $SCOPE | urlencode)&scope_data=$(echo $SCOPE_DATA | urlencode)&response_type=${RESPONSE_TYPE}&redirect_uri=${REDIR ECT_URI}&username=${USERNAME}&password=${PASSWORD}" curl -b /tmp/ cookies.txt -c /tmp/ cookies.txt -v -v -v -L -X POST -d "${AUTH_DATA}" "${AUTH_URL}" Any other suggestions/modifications that would make this work in one automated script?
alexa voice service
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

April L. Hamilton avatar image
April L. Hamilton answered
Miguel Mota's blog post is about AVS, not ASK. If you're working with AVS, try this forum: https://forums.developer.amazon.com/forums/category.jspa?categoryID=60
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.