How to Get a Bearer Token in Passly and Use Pagination

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)

Screen_Shot_2021-03-09_at_8.14.28_AM.png

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>

Screen_Shot_2021-03-09_at_8.14.46_AM.png

The response will be:

Screen_Shot_2021-03-09_at_8.15.12_AM.png

 

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:

Screen_Shot_2021-03-09_at_9.10.32_AM.png

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.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Contact us
Provide feedback for the Documentation team!