Pinata
Published in

Pinata

How To Build a Token-Gated Music NFT App

With Pinata Submarine

Getting Started

Setting Up The Project

npx create-next-app token-gated-music-player
cd token-gated-music-player
npm i pinata-submarine wagmi ethers siwe next-auth

Authenticating With Sign In With Ethereum

NEXTAUTH_SECRET=SOME SECRET PASSWORD
JWT_SECRET=ANOTHER SECRET PASSWORD
DOMAIN=localhost:3000 // In production this will be the URL of your web app
ALCHEMY_ENDPOINT=ALCHEMY ENDPOINT
SUBMARINE_KEY=YOUR PINATA SUBMARINE KEY
GATEWAY_URL=https://yourdedicatedgatewayurl.com
CONTRACT_ADDRESS=NFT CONTRACT ADDRESS

Setting Up The API

Wiring Up The Front End

Conclusion

--

--

The cloud wasn’t built for this. Pinata was. Managing your NFT media just got easier.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store