How to generate and use API Tokens in Strapi

preview_player
Показать описание

In this video we show you how to make use of API tokens for authorization in Strapi. We look at how you can set fine grained collection level custom access on a token as well as set the duration a token should live for. Token authorization is much more powerful in Strapi 4.4 and beyond but users can also still use the User Permissions plugin if they need individualised access.

0:00 - Intro
0:28 - Creating the API token
1:40 - Testing the token in Postman
3:14 - User based permissions plugin

Рекомендации по теме
Комментарии
Автор

Great tool!!. Thanks a lot for the information

kyiv
Автор

Cool. Can you also demonstrate how to combine Token access and role access?

danhu
Автор

Ah so this can be very useful if you have separate/multiple front ends that suits different audience…. Example like if you make a 7 day invite link for a vendor to fill inventory.

hanes
Автор

Is it possible to create tokens via code as well? Or only via de admin UI? Would be cool to use this feature so the api is protected by the token but users don't have to authenticate themselves but can generate a token they can use. That way you can easily create an API as a service

reinvl