Authenticate from the Swagger UI Sandbox

The Laserfiche API development team is using Swagger UI to allow you to interact with the API through a visual playground. Test out the Laserfiche API by visiting one of the following links depending on where your Laserfiche Cloud repository resides:

Get a token from the AccesToken route

Note: The AccessToken route is pinned at version "v1-alpha." Version 1 will follow the OAuth model. In the sandbox, use the Select a definition option and select v1-alpha to see the AccessTokens methods.

  1. In the AccessToken section, expand the Post /v1-alpha/Repositories/{repoId}/AccessToken/Create endpoint
  2. Click Try it out.
  3. Within the repoId, type in the repository ID for your Laserfiche Cloud repository in the format: r-xxxxxxxx
  4. Note: The repository ID can be seen on the Plan page of the Laserfiche Cloud Administration site, the Overview page of the Repository Administration site, and in your web browser address bar when viewing your Laserfiche documents.

  5. Leave the CreateCookie query option blank. It will default to "false"
  6. Within customerId, add your 9-digit or 10-digit Laserfiche Cloud account ID.
  7. Scroll down to the Request body section.
  8. Type in a username and password. Note that this must be a real user account.
  9. Optionally, type in a value for the applicationName. All of the activity in the repository authenticated from this token will appear in your Audit logs with this information.
  10. Click Execute.
  11. Locate the response body and copy the authToken value.
  12. Scroll to the top of the page, switch to the v1 definition, and click Authorize to display the following dialog box.
  13. Within Value, copy the authToken value copied from step 10.
  14. Click Authorize.
  15. This will automatically add the Authorization header to your requests with the bearer token.
  16. Now you're ready to make any other Laserfiche API call in the playground.
  17. Note: The sandbox will automatically append the Bearer prefix to your authToken. When creating your integration, please make sure the Authorization header value has Bearer before your authToken, e.g., "Authorization: Bearer {authToken}"