I am implementing authentication with the Spotify web API as part of a larger project. Yes I know there are already crates that can handle it for me but that is no fun. I am implementing the auth code flow. To spare you reading the documentation, you basically open a URL with the API credentials and some other info in the URL query for the user to authorize your app, and the user is redirected to the callback URL you specified with the auth code in the query, so I just listen on the localhost port to capture the redirect. Then you send a POST request to the token endpoint with the API credentials and the auth code to get your access token.