An API Token is a pseudo-user account that’s useful for anyone developing an application using the Portfolio REST API.
Usually, an API-based app would need to log in to the Portfolio API and get a session ID, which it would need to renew when its Portfolio session times out.
Instead, you can create an API Token which the developer can use to connect to the API, bypassing the need for additional session management.
You can assign the API Token any role in all catalogs.
The permissions that a session using an API Token has depend on its role in each catalog.
Connections using an API Token don’t count against the number of user connections available to your Portfolio installation.
To generate an API Token:
Click Users.
Click Add at the top of the Users pane.
Enter an Account Name for the token.
Select the option Add New API Token.
Select Add user to all catalogs as, then select a Role from the drop-down menu.
Click Create.
Select the new token in the list of users on the left.
Make a note of the Token value. You will use it instead of a session ID in calls to the REST API.
When using an API Token, you don’t need to call service.login to get a session ID, so your connection will never time out, and it doesn’t count against the number of user connections available to your Portfolio installation.
To change a token’s access to a catalog:
Click Catalogs and select a catalog.
Click Users at the top of the Catalogs pane.
Click the pop-up menu in the Role column for the token account, then do one of the following:
To change the user’s role, choose a new role from the pop-up menu, then click Change Role in the confirmation dialog.
To remove the user from the catalog, choose None from the pop-up menu, then click Remove in the confirmation dialog.
For more information about the Portfolio API, see The Portfolio API.