question

Prasenjit avatar image
Prasenjit asked

How to do a handshake only from iPhone

Hello AexaTeam, I was successful in compiling the handshaking node.js and java client app to get the handshaking token. But my requirement is to use an iPhone to connect to AVS without the node.js code If I have to successfully connect to Alexa service [b]only[/b] from iOS without the need to connecting to the locally run service - how am I to accomplish that? If I've missed out some sort of documentation, please guide me towards it. I'd also appreciate if you ought to let me know if this is viable for AVS? If so how? Thank you for taking the time out to read my query and spending the time to address it. I shall await your reply.
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.

Gautam@Amazon avatar image
Gautam@Amazon answered
Hello Prasenjit, Yes, it is possible to create an iPhone app that directly communicates with Alexa (and doesn't require the node.js service). We don't have an example just yet of how to do that. But this post is a good place to start: https://forums.developer.amazon.com/forums/thread.jspa?messageID=22597 Please fell free to reach out if you have any more questions. - Gautam
10 |5000

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

Prasenjit avatar image
Prasenjit answered
Hi Gautam, That link is indeed helpful, but what I'm unable to understand is how to call alexa after I introduce the token code. Also the fact that I dont know what are the two parameters in the different thread supposed to be. Thank you for understanding my query.
10 |5000

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

Prasenjit avatar image
Prasenjit answered
Hello again, So I went ahead and found the link from AVS https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/docs/authorizing-your-alexa-enabled-product-from-an-android-or-ios-mobile-app Unfortunately I'm not able to follow it so I went ahead and downloaded this iOS sample provided in that same webpage. but as I see this app use local service. That is not what I'm after as the provided sample iOS app hides the button for Amazon login. I was hoping you could help me find some specific details that can help me understand the complete process. Thank you for your time.
10 |5000

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

elstryan@Amazon avatar image
elstryan@Amazon answered
Hello Prasenjit, The link in your last post is for using a mobile device to authorize a separate physical Alexa enabled device. This is why there is a reference to a local service. You are indeed correct that this is not exactly what you're looking for. If you want to do a handshake only from an iPhone and then make requests and responses from that iPhone to AVS you'll need a mobile application which uses Login With Amazon to fetch down an access token. The fastest way to accomplish this would be to make some adjusts to the iOS sample app that you linked. (Gautam is correct that we don't have an example just yet of an application that does the handshake and then makes AVS requests from a mobile device). Please see this post: http://forums.developer.amazon.com/forums/thread.jspa?messageID=25327拯 which has sample code and discusses precisely your use case for fetching down an access token directly on your iPhone starting with the iOS sample. The thread that Gautam linked to (especially the 2 oldest comments might be handy reference as well) Thanks, Ryan
10 |5000

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