Skip to content

Log in using Swagger UI

Isabel Costa edited this page Dec 26, 2018 · 1 revision

This page shows how to log in a user and then use the User token to access a restricted API.

  1. Go to POST /login API under Users section and click "Try it out" button:

First step

  1. Use valid credentials in the request body. Valid credentials mean username/email and password from a user that has already been registered to the System and has its email verified. Then click the “Execute” button:

Second step

  1. Copy the access token returned in the response (highlighted in blue).

Third step

  1. Then use it in a restricted API, e.g.: GET /user to get the logged in user’s profile. Paste the access token as indicated in the Authorization field following this example: “Bearer <access_token>”.

Fourth step

  1. Then hit the “Execute” button, and you’ll be able to receive a proper response.

Fifth step