היי,
האם למישהו יש ניסיון בהתחברות עם TOKEN (סעיף 3)?
אני כן מצליח להתחבר עם Basic Authentication באמצעות שם משתמש וסיסמא.
אך לא מצליח להתחבר עם PAT, כמובן שהוגדר טוקן והוא פעיל.
<h3 id="authentication">Authentication</h3>
There are 3 ways you can authenticate with the REST API:
- Basic Authentication: This is the default and most straightforward authentication method. Every HTTP request contains an authentication header according to the Basic-Authentication standard, in order to apply any relevant permission restrictions. HTTP requests that lack such a header are denied.
In this case, you need to consult with your System Administrator to obtain a valid user name and password. The user name is defined in the API User Name field of the Personnel File form and is separate from the user’s standard user name.
- OAuth2: This is generally used for 3rd-party access to the API. The API client needs to implement the OAuth2 flow, and provide an Authorization header of <code class="language-plaintext highlighter-rouge">Bearer. Note that this option requires the purchase of the External ID module for Priority.
- Personal Access Token (PAT): Introduced in version 19.1 of Priority. With this method, the admin can set a secret token to be used by the client in order to authenticate. Multiple PATs can be associated with a single Priority user, and they can be replaced or deleted independently of one another. PATs can be defined in the REST Interface Access Tokens form in Priority. When using this method, the Authorization header should be set to Basic, the username should the PAT that was defined, and the password should be hardcoded to <code class="language-plaintext highlighter-rouge">PAT.
Note: You cannot use Basic Authentication (method 1) while External ID access is enabled.