Question
- How do I get a bearer token in Passly?
- How do I get past the first 100 records?
Resolution
Bearer Token (Using Postman)
To get an access token use the below API endpoint.
POST https://cp.my.passly.com/authorize/token (change cp to your Passly home realm, and note the .com or .eu depending on your URL)
The Body is as follows:
Select x-www-form-urlencoded with the below attributes
Key | Value |
grant_type | password |
client_id | my:passly:portal |
username | <yourUserName> |
password | <yourPassword> |
The response will be:
Now that you have a token, you can make API calls against your Passly tenant. You can find all the available API endpoints within the Passly UI:
Pagination
In order to get more than 100 records, you would need to use the attributes top and skip. NOTE: Skip must be used with an order by attribute, while top can be used by itself.
Example:
The below API endpoint will provide you the second record in your Passly user list.
GET https://cp.my.passly.com/api/directory/People/PeopleDTO?$orderby=PrincipalName&$top=1&$skip=1
This will skip the first record, and return the top record which is the second record as the first one is skipped.