Reputation: 21
Can anyone provide any guidance or have any idea on how to connect Dialogflow with a music streaming API such as Apple Music, Spotify, etc to create playlists with my Agent? I've found some research in these locations to confirm that they do offer this service to developers but I honestly don't know where to begin.
I have visited the developer site for Both AppleMusic and Spotify but it isn't clear on how I implement their code with Dialogflow
My main goal is to have a user be able to tell the Agent "I'm in a good mood" and the agent will respond "That's great! I made you a playlist for your day: (Insert Playlist)".
Upvotes: 0
Views: 251
Reputation: 3261
If you wish to integrate Dialogflow with any service using custom behavior or logic you can do that using fulfillment. With fullfilments you can trigger code on a server that you create which interacts with the service of your choice (in your case Apple Music and Spotify).
In this server you can code whatever you want your bot to do when you user talks to your bot. So when they say "I'm in a good mood", the server will add a playlist to their account and once this is completed you tell Dialogflow what to return to the user. The only thing you have to do is make sure that the server returns a response that Dialogflow can understand.
Upvotes: 1