GithubHelp home page GithubHelp logo

Comments (17)

tamhinsf avatar tamhinsf commented on June 14, 2024

You should be sending ENQUEUE in response to PlaybackNearlyFinished. The example Microsoft Groove Music API example I've included shows you how to do this.

Can you deploy in debug mode, attach your VS debugger, and see the response that's generated when you send your ENQUEUE operation?

from azure4alexa.

smussani avatar smussani commented on June 14, 2024

@tamhinsf : I tried to run you Alexa4Azure skill with Groove Music. I am able to complete all the steps except when I go to link my MS account on the Alexa App, I get the following error
We are unable to complete your request
Microsoft account is experiencing technical problems

I have setup Amazon Account Linking page correctly and have added the client_id from my Groove App

I am not sure if Alexa is sending the client_id parameter to oauth20_authorize.srf

from azure4alexa.

tamhinsf avatar tamhinsf commented on June 14, 2024

I would suggest you open a standalone web browser, go to https://alexa.amazon.com, and try to enable your instance of the Groove Music skill there. You may have missed step in the Alexa Skills linking page and/or Microsoft application registration portal - which the Alexa app won't show to you. I may have messed up the instructions as well.

from azure4alexa.

smussani avatar smussani commented on June 14, 2024

I tried to enable using a standalone browser and got the following error
https://login.live.com/err.srf?lc=1033#error=invalid_request&error_description=The+provided+value+for+the+input+parameter+'redirect_uri'+is+not+valid.+The+expected+value+is+'https://login.live.com/oauth20_desktop.srf'+or+a+URL+which+matches+the+redirect+URI+registered+for+this+client+application.&state=eyJpbml0VmVjdG9yIjoiekVnYXhEVGt1VE1VdTNjSEI4dE9hdz09IiwicGF5bG9hZCI6IlVucVJBZFkwcE5GczNGNGt5c1hvRkhLbU5MMTB3RzE1TnZHUXczUnhCNG5FQlYzSDdWbkI3eThleUFKYzNzT1B5Q0c5SUJENU1ZdEpJL2VvZEZWQjE5VFVqRTA1WWpqTWxvOGFVOEx2c2hnWTNjSGhYdkhtU3hjbG4vRnpkeXgrVllpZm11K1BCMTJXRnpuczY2OWg3UDlHcUd1WFR0REZRYnZkcUZlM2w5anhGUkNoNlVUMTl5c2Q5UjJESzRmaEtzT0lHUDBiTGpXN2ZlVUMrN1RzVnNPT0tHWXU2NUppSWpqRi82ajN5MUh1ZytRQkdQWS9FdElFS0UrZ3pvc3JpOXR4WDVDWFQ2T2taYkpDU1RDTm9DRFhhOS9xeVdWazF1cVlaSU55dzVvT2QyeXZsOVN3a1gzcXM0QkVFQzB1djArbWNnK1hNOFNrMzRqZmRhUU14aitJeXhJamFBV3Zib2Y0UkI4VmNnYlhJQnc4a21vd1lvUFZ4Mk9hQlA5eVJQRjBjNjhIbDIwOUpJSHZTc2NyTnJVSExnL2NoMEN0MFV6UVQ2cyt3RkVDZlgyeWFkQnFzaFFMLzRVelpVNDZEYVRzd2RXcFhyZHVZYndGRTkrN21ybGgvSWsrVVdTRWtaK0dLeVprVFhOUFFRcyt4U005MlAvTEE1aGpQYXdQK1pncjZ5cEF3eXlPYjNsY2FNRzJhVEcrY3Vja1BxRkRoWXRqcWNnaGdNTGlyRFVnMXFPaDZMSWdkUXZXVzQ5ZkFJOGE3dkxMbkZIcFFLZ2ZmOU81Rk9TTjRULzduV2FiQ095NGZ3VWpxME5jUU01ejZLY3ZXczdxSlJaT0Y1R0c1N3NWeGJMRkJmTi9yMmVmNHBiSnpsZ3h2YktPK0ZNRDZSM2N5RXJpUU9tL2dwZFREdHdEa2xTeUY4dFZYQi9PNFpEYzdRa1hxRWdRQVpxQ0ZSaDFIb0RkTENPa3R2aWpqMFRJbUo4Z2UxdllEL0dMcnNzN3NIVnVRYmdSVW1lUVE1YkdDOEJHMUU1YkpWb1ErUWVXQXA3QVFQZTdpQUo2aDRQaThjQ0ZIQUN2RFNoSG5PRkJGMEx5Q1ErYUhDTUFHS0lseld3Tm5tOXN3RnFSL0NROUxvK1dBWS9vSDh1aHB4NVpzRWFNNE5oWDdxcDU1cHlqOEl1K1oyd056MzltIiwidmVyc2lvbiI6MX0

from azure4alexa.

smussani avatar smussani commented on June 14, 2024

Amazon Account Linking page gives me two Redirect URLs.

I am setting these redirects in my MS Application under Web Platform Redirect URIs

from azure4alexa.

smussani avatar smussani commented on June 14, 2024

On my original question about ENQUEUE, I am generating the following and sending it to Alexa service on PlaybackNearlyFinished call.

{
"Card": null,
"OutputSpeech": null,
"Reprompt": null,
"ShouldEndSession": true,
"Directives": [{
"type": "AudioPlayer.Play",
"playBehavior": "ENQUEUE",
"audioItem": {
"stream": {
"token": "33|fdd9052a-717f-414f-a438-1072a64d0f49|831",
"expectedPreviousToken": "33|fdd9052a-717f-414f-a438-1072a64d0f49|830",
"url": "https://www.ppp.com/mysong.mp3",
"offsetInMilliseconds": 0
}
}
}]
}

As you can see, I am sending ENQUEUE as the behavior, but it is not working.

You mentioned that I could use the VS debugger, but I am not sure how exactly to use the debugger when my API code is published to my domain

from azure4alexa.

tamhinsf avatar tamhinsf commented on June 14, 2024

README.md has the wrong value for the Access Token URI field. It should be: https://login.live.com/oauth20_token.srf in the Amazon Developer Console.

README.md has been updated. Please try signing in again.

from azure4alexa.

smussani avatar smussani commented on June 14, 2024

Hi Tam,
I tried by changing the Access token URI. Got this error
https://login.live.com/err.srf?lc=1033#error=invalid_request&error_description=The+provided+value+for+the+input+parameter+'redirect_uri'+is+not+valid.+The+expected+value+is+'https://login.live.com/oauth20_desktop.srf'+or+a+URL+which+matches+the+redirect+URI+registered+for+this+client+application.&state=

In your README file you mentioned to use NA URL. I am not sure what that is
Redirect URIs - paste the NA URL from the Amazon Developer Console

The only two URLs that Amazon provides to me are
https://layla.amazon.com/api/skill/link/M35O2I56UQCN2A
https://pitangui.amazon.com/api/skill/link/M35O2I56UQCN2A

amazon groove

from azure4alexa.

tamhinsf avatar tamhinsf commented on June 14, 2024

Use the "https://pitangui" as your re-direct URL in the Microsoft Application Portal registration. Looks like Amazon removed the EU and NA URL labels in the "Redirect URLs (Optional)" section of their page.

It seems that your app is or was registered on the Microsoft side as a desktop app, judging by the error message you're getting. I'd make sure the Client IDs match up as well. A screen cap of the Microsoft Portal might help here.

from azure4alexa.

smussani avatar smussani commented on June 14, 2024

With https://pitang.. I get the following error
Microsoft account is unavailable from this site, so you can't sign in or sign up. The site may be experiencing a problem.
From the URL, I don't get the invalid "redirect URL" error
https://login.live.com/oauth20_authorize.srf?client_id=4d93f338-a80f-4335-853b-f5a02dabaefc&response_type=code&state=eyJpbml0VmVjdG9yIjoicT&scope=MicrosoftMediaServices.GrooveApiAccess+offline_access&redirect_uri=https%3A%2F%2Fpitangui.amazon.com%2Fapi%2Fskill%2Flink%2FM35O2I56UQCN2A

I did verify, the client ids are correct.

Here is the screen shot from MS with https://layla setup
microsoft groove

from azure4alexa.

tamhinsf avatar tamhinsf commented on June 14, 2024

I don't know why you have a "Mobile application" configured, but it seems that you're using the Client Id that's associated with it in the Alexa portal. You should be using the Application Id at the top of the Microsoft Portal.

from azure4alexa.

smussani avatar smussani commented on June 14, 2024

Tam,
I removed the Mobile App option from MS aaplication screen. Made sure that Client ID is from the top of the MS Application page.
I click on Enable Skill, I get the MS UN and PW window. After I submit, I get the following error

Microsoft account is unavailable from this site, so you can't sign in or sign up. The site may be experiencing a problem.

The browser URL does not show any redirect URL error
https://login.live.com/ppsecure/post.srf?client_id=4d93f338-a80f-4335-853b-f5a02dabaefc&response_type=code&state=XXXSSDSDD&scope=MicrosoftMediaServices.GrooveApiAccess+offline_access&redirect_uri=https%3A%2F%2Fpitangui.amazon.com%2Fapi%2Fskill%2Flink%2FM35O2I56UQCN2A&contextid=D0EB288D93F68077&bk=1487800650&uaid=96df72efacda4c449e1b265e6932e733&pid=15216

I am not sure what else I can do. Are you still able to run Account Linking from your skill?

from azure4alexa.

tamhinsf avatar tamhinsf commented on June 14, 2024

The browser URL you pasted indicates a couple of potential problems.

The client_id still seems to be the longer value associated with the Mobile App you removed. The client_id for a Live SDK application (which Groove uses) is usually a shorter string without hyphens.

The redirect_uri is the "https://pitangui" value which needs to be registered in the Microsoft Portal. You have the ability to register multiple redirect_uri values, I would validate that and the "https://layla" URL are saved.

If you're unable to resolve your problems after trying these two changes, I would suggest you start over and create a new instance of the skill on both the Microsoft and Amazon side.

from azure4alexa.

smussani avatar smussani commented on June 14, 2024

I will take your suggestion and start over. I really appreciate you sticking with me on this :)

Just FYI,
Below is the screen shot from my MS Application page. Client ID is shown there.
image

Below is the screen shot from my Groove Setup, same client id is used there.
image

I added https://pitangui URL to my MS application. When I try to add another one, I get the following error
image

from azure4alexa.

tamhinsf avatar tamhinsf commented on June 14, 2024

Your application needs to be registered under "Live SDK applications" on the Microsoft side:

https://identity.microsoft.com/

I'm not sure if this is the case. See Step #6 under "Register and associate a Microsoft Account application" -> "Create an application" on this page: https://docs.microsoft.com/en-us/groove/getting-started

from azure4alexa.

smussani avatar smussani commented on June 14, 2024

Well, I recreated the skill, MS app and Groove connections from scratch. I still got the same error.

Client ID generated by MS app is still a large string with hyphens in it.

from azure4alexa.

tamhinsf avatar tamhinsf commented on June 14, 2024

I'm going to close this issue - updates to AlexaSkillsKit.NET has been created that include audio directive support. I'm no longer maintaining my embedded fork of it new versions of my project.

from azure4alexa.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.