All Collections
Gateways
How to use Gateway Access Controls with Local Host
How to use Gateway Access Controls with Local Host

Need to open up your gateway in a dev environment? This is it!

Steve Simkins avatar
Written by Steve Simkins
Updated over a week ago

Pinata's Gateway Access Controls offer several ways to open up your gateway to content outside of your account while keeping it secure. Lots of people using open gateways are trying to build projects like Marketplaces or NFT indexers, and chances are you will want to do that in a local environment. Here's how you can open up your gateway while using something like http://localhost:3000 when building apps!

Gateway Access Token

One easy way to access it is through using an access token which you can create on the Restricted Access page and clicking "Request Token"
โ€‹

After you have a token you can simply add it onto your gateway url as a query, like so:

https://yourgateway.mypinata.cloud/ipfs/CID?pinataGatewayToken=PASTE_TOKEN

IP Address

If you plan to use host origins in production, you won't be able to just paste in "http://localhost:3000" to the host origin control, however you can use your IP address as a way to not bother with access tokens.

First you will need to local your local IP address. There are lots of ways to do this, and this article is a good place to start.

Once you have your local IP address, simply visit the same Restricted Access page and click "Set IP Address," and paste in the local IP address.

After a minute or two, you should now be able to fetch content through your gateway on local host!

If you need any further assistance feel free to message us on our app or email us at [email protected]!

Did this answer your question?