I have got the following flow working with spotify based on OAUTH2, but currently I have to manually pass some data to get it to work:
-
I get the user to approve access on spotify by having the user visit the following url:
https://accounts.spotify.com/authorize?client_id=#redacted#&response_type=code&redirect_uri=#bubble app uri goes here#&scope=user-top-read -
This returns the user to the callback uri with a code
#bubble callback uri#&code=AQCVs_U96kUcIKdZhsfUoOHyJ5FD8Cem-SeSvvdKyLsTVHey7RzG8pTurHruQZMyrhftoxhSUKhD6tQXpK1a2gz-Rb2LJ_GFgD7d5IY_apzF5jDgs753A6fNIoqiwkoZjvn6lYuwysB0Tymuk3PclVeOW3_WzrnicqHe2SBlZ0DxQrRzF4z6mtQWexbCAAE2cf2HQDynBrnxTi6itscSZvoDgm_vFOYkQlFajx-oLfQhTtFzNQ
-
I make a post request to spotify using the code and some other params (client id, client secret etc) to get the access token / refresh token
-
I am able to make api calls using the spotify app
This all works fine, but the problem is that currently I manually have to take the code returned in the callback uri (step 2) and pass it to my post request (step 3). Is there a way for bubble to parse the string from the callback uri and automatically handle this?
I attach a screenshot of my Oauth2 custom token settings:
Thank you,