Spotify API calls using TRPC
Hi, I would like to make use the spotify API in my t3 app. The following repo shows how I would retrieve my token. https://github.com/spotify/web-api-auth-examples/blob/master/client_credentials/app.js
Where would this be done in the stack? If there are docs highlighting this could you please point me to it?
Thanks
GitHub
web-api-auth-examples/app.js at master · spotify/web-api-auth-examp...
Basic examples to authenticate and fetch data using the Spotify Web API - web-api-auth-examples/app.js at master · spotify/web-api-auth-examples
3 Replies
I would like this to be done in the back end since I am using secret keys
Anything done on the mutation/query side is done on the server so if you dont want to leak keys, keep that stuff in those methods.
In this post you can just replace it with a mutation/query and its almost verbatim something like
Its v9 syntax since I havent upgraded yet basically everything you would do in a traditional endpoint, you just do in your query/mutation
Thank you!