Access Token
In this section, you will find information about Profile Personal Token and Access Token (PAT).
At this stage of Account customization, you need to make the following settings:
Generate the Personal Access Token (PAT) keys
StackSpot generates for you, as a user, an Access Token or PAT (Personal Access Token). This allows you to run StackSpot's services using a client id and a client key.
This type of authentication makes it possible to keep a session active with a configurable expiration time. You need to use STK CLI via the command line, for example, in CI/CD pipelines. You need these credentials to run some commands, for example, in a Pipeline via the command line in the STK CLI.
How to generate a Personal Access Token (PAT)
For security, credentials like the Personal Access Token (PAT) are stored encrypted in StackSpot. After saving, it is not possible to view or retrieve this information again through the platform.
Follow the steps below to generate your Personal Access Token (PAT):
Step 1. Access the Account Portal directly, or after logging into the StackSpot Portal, click your profile avatar;
Step 2. Click 'My profile';
Step 3. In the profile menu, click 'Access Token';
Step 4. Click 'Generate Client Key' to create the keys for your Personal Access Token (PAT), which will be used with the stk login command in the command line or pipelines. A screen will display the following information:
Client IDClient Key- Realm
- Usage example
This information appears only once. Copy and save it in a secure place.
Step 5. If needed, click 'Generate new client key' to generate a new key. Now, use this information to authenticate via terminal.
- The keys are generated individually for each user. If you generate a new key, the previous one will be automatically invalidated.
- Generating a new key does not invalidate keys from other users in the organization.
- The session expiration time is 20 minutes.
- PATs are generated per user. If you generate a new PAT, your previous one becomes invalid.
- Generating a new PAT does not affect other users’ tokens in your organization.
- The session expires after 20 minutes.
Authenticate via Command Line
To authenticate, run the following command in your terminal or pipeline, replacing the placeholders with your actual values:
stk login --client-id <ID> --client-key <KEY> --realm <REALM>
Execute the command above without the < > keys.
You need to authenticate every time you want to automate a process using StackSpot.