question

newuser-7ac6986c-c46b-4575-ae83-93ea846ea665 avatar image

How do a get the in-skill-products a user is entitled to outside of an alexa session

Hi,

I asked this question over at stackoverflow too: Link.

I guess I could have more luck here. I don't want to just copy my whole question from stackoverflow, so please read it over there, if you need more details. But my question in TL;DR format:

I have an Alexa-Skill and am building a Web-App for this skill. In the skill users can buy a subscription for an ISP and in the Web-App I need to know if a user is subscribed (is entitled) to that ISP. How can I do that and is it even possible?

pythonawsispask-sdk
10 |5000

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

Andy Whitworth avatar image
Andy Whitworth answered

Here was the thread which seems to confirm to me it wasn't possible

https://forums.developer.amazon.com/questions/209418/checking-isp-subscription-status-while-out-of-sess.html

I wonder if it's possible to add the permission mentioned in the error to the skill being queried ?

10 |5000

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

Andy Whitworth avatar image
Andy Whitworth answered

You can't invoke the monitization service outside of a skill session unfortunately, I've tried!

Once I'd written some code to test it, and found out it didn't work, I did find some Amazon documentation which confirmed it wasn't possible. Struggling to find that now though.

10 |5000

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

newuser-7ac6986c-c46b-4575-ae83-93ea846ea665 avatar image
newuser-7ac6986c-c46b-4575-ae83-93ea846ea665 answered

Thank you so much for this link! I can't believe I didn't find this after all the google'ing I did.

I would indeed say that this confirms it, even though the Amazon staff answering didn't seem to understand what the user was trying to achieve.


I tried to add the permission, but failed horribly. I have no idea how to get the ApiAccessToken needed.

I went through the same steps as the user asking the question in this thread. I was also able to use an ApiAccessToken from the in-skill session. But that token expired after a few minutes.

1 comment
10 |5000

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

In my case I was invoking my Alexa skill code out of session using the Alexa Skill Messaging API. The Messaging.MessageReceived payload which the skill receives does contain an ApiAccessToken but when I attempted to use this to determine a users ISP products then I got the 401 error. I might try revisiting it with a test skill.

0 Likes 0 ·