Introduction
The Assets Library is The Forge’s file storage. It is where uploaded media, such as images, video, or audio is located. On The Forge, you’ll be using it a lot for your Foundry VTT games.
In many cases, sharing your Assets Library is helpful when running a game with your friends, such as if a friend is GMing a game for your group, or if you want all token and portrait art in your storage. It is also useful when you want your players to have the ability to select from art you have uploaded for their various items in-game.
Fortunately, The Forge offers an easy and secure way to share folders and your Assets Library in general, via our “API Key Manager”. With it, you can generate any number of keys with different permissions (read only, or read and write), share specific folders or the entire storage, and even set a time limit if you only want temporary access to your files.
The API Key Manager also allows you to revoke access to a key at any time, should your sharing needs change, or you are concerned about the security of your Assets Library. All of this is done through a user-friendly UI, without any need of fancy coding or technical knowledge. We explain how to use it below.
How to Use the API Key Manager
How to share a folder
You can generate a key to share your folder directly in your Assets Library (The Forge). You can do so one of two ways:
- Hover over a folder that you wish to share. You will see a share button to the left. Click on it to get a popup menu that will guide you through sharing the world.
- You can also navigate to the sidebar of the folder you are currently in (which includes the root folder, or your entire Assets Library in layman’s terms). From there, select the Share button, highlighted below:
- After you have clicked the
Share
button for the folder you wish to share, you will be shown a popup menu with options for the key.
Permissions
You can set permissions for the shared folder’s key. By default, it will be “Read Only”, meaning whoever you share your key with can only view assets uploaded into that folder, and cannot upload, move, change, or delete assets. If required, you can also give “Write” permissions when sharing the folder, allowing those you share your API key with free reign to make edits or delete content as necessary.
Key expiration
You can set how long a folder will be shared with others here. By default, a key is set to never expire, unless manually revoked by the owner. You can set the time variably, from 15 minutes, to 30 days.
Key Name
Here, you can set a name for the key to your shared folder. If you find yourself sharing keys a lot, or might forget about why you’ve shared the key, naming it appropriately can be very helpful. You can see the name of the key under the key management screen within your Assets Library, and in the account page for shared keys.
Confirmation
Once you are certain that you are ready to share the folder, select the Generate New Key
button. This will give you a share link that you can send to others, as well as a key to the shared folder should you require it for local Foundry VTT installations (for more information on that, see the relevant section below). Make sure to only share the URL and key with those you can trust.
Warning: Please make sure you can trust the person/people you share a folder with, whether it is “just” read access, or read-and-write access. The Forge is not responsible for any metagaming, lost assets, or other issues arising from shared folders.
Note: You can also generate new API keys via your account API page: The Forge . However, access can only be shared for your entire Assets Library here, while the Assets Library page has more flexibility in location sharing. We therefore recommend setting up new API keys on your Assets page, as explained above.
Revoking access to shared folders
You can always manually revoke a shared folder, whether or not you have set an expiration date on the key. You can review and revoke shared folder keys in the following two locations:
- You can do so via the Manage menu in your Assets Library Page. You can access it by selecting the
Manage
button, highlighted below.
- You can also manage shared folders in the API section of your account page on the Forge. There is a
Revoke
button beside each shared folder key, and a button at the bottom of the page toRevoke All Keys
.
Please note that once a key or key(s) have been revoked, you will have to generate new keys to share your folders again. The process of revoking a key cannot be reversed.
How to navigate Assets & Folders shared with you
After you have accepted and added another user’s shared folder on The Forge, you can navigate to your Assets Library to view the shared folder.
You will see a user group icon/button with a cog next to the My Assets Library
heading.
Selecting this button will open a dropdown menu, with a list of all shared folders added to your account. If the button is not visible on your My Assets page, the shared folder key has either expired, or was not correctly accepted.
Within this dropdown menu, you can select a shared folder. Once it has been selected, you can view any of the assets or folders that have been shared with you here, as well as make edits if the shared folder key has “write” permissions. You can even search within shared folders for a specific asset, just like you can in your own Assets Library.
Note: Expired API keys will be removed from your My Assets Library page, but are still visible and listed as expired in the API section of your Forge account page.
How to use shared folders in-game on The Forge
Once you have added a key to your Forge account, a new dropdown menu will be added to your file picker in-game.
By default, it uses your Assets Library as the default location to pick files from. You can select the “source” to reveal a dropdown menu, and change to the preferred shared folder.
Once you have changed to a shared folder, it will display everything within the shared folder. You can change back and forth between shared folders, and your original Assets Library without issue.
How to use shared folders outside of The Forge
First, you will need to install The Forge module and enable it in your world.
You can then be go to Configure Settings;
and then the “Module Settings” tab;
and enter the API Key.
Once you are done editing this field, save your settings, and you are good to go!
Note that this setting in Foundry VTT is only saved in the local browser. If you use a different browser, or incognito window, the API Key will need to be entered again.