lufinkey/react-native-spotify

Access Spotify search track without user authentication?

Woodhartt opened this issue · 5 comments

Hello, thanks for your module!

I would like to know if it's possible to have an access to the function Spotify.search() without the authentication of a user's account?
Is it necessary to have a user authentication to retrieve an access token or I can get one back in another way (without user authentication)?

Thanks for your answer!!

You must have user authentication to search

Required. A valid access token from the Spotify Accounts service

Thanks for your answer.

A last question, is it possible to make an authentication with client credentials flow in your module? Or it's just with authorization code flow?

Thanks!!

Could you clarify?

There are three types of authentication flows for spotify API: authorization code flow, implicit grant and client credentials flow. The client credentials flow is usde to connect to spotify API without user's authentication. In your module, I think the authentication flow used is authorization code flow (in your example). And I would like to know if it's possible to use client credentials flow, so connect to spotify api without user's auuthentication?

You can supply an auth / refresh token in the loginWithSession method