A Personal Access Token is a secure way to connect third-party tools and integrations to your Semine account — without sharing your login credentials. You can create a token, set an expiration date and edit or delete it at any time.
See Also: Role Permissions
Benefits:
- PAT eliminates the need for authenticating via username and password and can immediately be revoked and reissued without any impact on the main account.
- Use a PAT for long term authenticating for system-to-system integration via the API without interactive login or MFA prompts.
Accessing Personal Access Tokens
Go to My Profile > Personal Access Tokens in the left navigation panel.
The Manage Personal Access Tokens page will open. This is where you can see all your existing tokens and create new ones.
Creating a Personal Access Token
On the Manage Personal Access Tokens page, click Create new.
The Create Personal Access Token dialog will open.
- Enter a Name for your token. This is a required field (single-line, maximum 100 characters).
- Optionally, enter a Description to help you remember what the token is used for (optional, multiline, maximum 500 characters).
- Select an Expiration Date. The default expiration date is pre-filled to either January 1st or July 1st — whichever comes first and is at least 6 months from today. You can change this to any date that is at least 6 months from today and no more than 1 year (365 days) from today.
-
Click Create.
A confirmation message will appear: "New token successfully created."
Field requirements:
- Name - Required. Cannot be blank or spaces only. Maximum 100 characters.
- Description - Optional. Maximum 500 characters.
- Expiration Date - Required. Must be at least 6 months from today and no more than 1 year (365 days) from today.
Once the token is successfully created, the Copy your token dialog will appear. You will see the full token value in the read-only Token field, along with the warning message: "This is the only time you will see the full token. Please copy and store it securely."
-
Click the copy icon next to the token field to copy it to your clipboard. Note: the token field is read-only and cannot be edited.
A confirmation message will appear: "You have copied token to your clipboard."
- Click Close when you are done.
Clicking Close dismisses the dialog and returns you to the Manage Personal Access Tokens page, where your new token will appear in the list with an Active status.
Each token in the list shows the following information:
- Name — The name you gave the token.
- Description — A note about what the token is used for.
- Expiration Date — The date the token will expire.
- Status — Active means the token is valid and can be used. Expired means the token has passed its expiration date and is no longer valid.
- Edit / Delete — Actions available for each token.
Edit
Click here to update the Name, Description, or Expiration Date of a token, including tokens that have already expired.
Delete
If you no longer need a token
- Find the token in the list and click Delete.
- A confirmation dialog will appear with the message: "This personal access token will be permanently deleted and cannot be restored." Click Proceed to confirm, or Cancel to go back.
Using Your Personal Access Token
Once you have created and copied your token, you can use it to authenticate API requests to Semine. Pass the token as the x-pat header in your HTTP request.
Example request:
curl --request GET \ --url https://webapi.semine.no/api/v1.0/currentuser \ --header 'x-pat: YOUR_PAT_HERE'
This example calls the /currentuser endpoint, which returns information about the authenticated user. Replace YOUR_PAT_HERE with the token you copied after creating it.
Kommentarer
0 kommentarer
Logg på hvis du vil legge inn en kommentar.