How to use authorization in Swagger

To use authorization in Swagger first go to your application by clicking on the URL or the preview window.

Next, when your application is already been created and you’re on the starter page click on Login and the next page also please click on the Login button.

Then you will be redirected to the admin page and from the left, on the menu, you need to go to API docs.

After clicking on API docs you will be redirected to the Swagger of your generated application, where you have to scroll down to the Auth (Authorization operations) and choose line POST /api/auth/signin/local.

Next, in the expanded window click on Try it out and next click on Execute button.

The Swagger user interface sends a request and shows the curl sent. The Response section shows the response. Next, copy the response on the Response body field.

The copied response should be pasted into the appropriate field called Value. For that go up the page and click on the green button Authorize.

After that in the pop-up window Available authorizations paste your copied response to the Value field and click on Authorize button.

Congratulations, you are authorized!


                                               Authorization in Postman →