This is a sample app that catches moods and creates a playlist from Spotify based on the mood analysis.
- .NET 8 SDK
- Visual Studio 2022 17.9 or later, or Visual Studio Code with C# Dev Kit
- Azure Developer CLI
- Azure CLI
- GitHub CLI
- PowerShell
- Azure subscription
- Azure OpenAI Service subscription
-
Create an app on Spotify and get the
Client ID
andClient Secret
from the Spotify Developer Dashboard. -
Run the following commands to provision and deploy apps to Azure.
NOTE:
- Since all the post-provisioning scripts are written in PowerShell, it is recommended to use PowerShell to run the
azd
commands. - You can get the latest version of Azure OpenAI API spec from here.
# PowerShell $AZURE_ENV_NAME="playlist$(Get-Random -Min 1000 -Max 9999)" azd init -e $AZURE_ENV_NAME azd provision azd deploy
- Since all the post-provisioning scripts are written in PowerShell, it is recommended to use PowerShell to run the
-
At the Spotify Developer Dashboard, update the
Redirect URI
to the one from Azure API Management Credential Manager. It should look likehttps://authorization-manager.consent.azure-apim.net/redirect/apim/apim-{{AZURE_ENV_NAME}}
. -
Authorise the credentials on Azure API Management.