Closed brycetryan closed 6 years ago
Hi @swinkl3
Thanks for the suggestion, I was not aware of this functionality in Discogs. As you seem to have it working, would you mind to open a PR and add this to the README.md as alternative to the OAuth authentication?
Discogs also supports authentication via inline auth in the http request. For my own purposes I didn't need full OAuth and struggled to get it working, so inline auth via the personal access token was enough to get the data I needed.
As per the developer doc a request like this works, replacing the token with your personal access token: curl "https://api.discogs.com/database/search?q=Nirvana&token=abcxyz123456"
You can add additional defaults when creating the client, or modify the php-discogs-api\lib\Discogs\ClientFactory.php defaults section to include the below to add the token to every request. 'query' => ['token' => 'YOURTOKENHERE']
This may help others wishing to deploy your code but not needing full OAuth :)