OAuth2 User-Agent Flow token extraction

Here is a demo : https://bubble.io/page?type=page&name=index&id=demo-spotify&tab=tabs-1

You have to create 2 API connections using the API Connector.

On the connection button workflow, the redirect uri should focus a dedicated page on your app (spotify auth page for me).

Then another workflow is executed when the auth page load.

Remember that the Spotify acess token will expire in few hours, so you need to refresh it when it has been expired and using the user refresh token (see the custom event).

If you find optimizations or better solution it will be great to share it !

3 Likes