How do I get my JWT token inside my custom plugin?

Apparently, you can get it through import {auth} from “@strapi/helper-plugin” too.
I believe this is the authentication of your strapi account instead of the super admin/admin that have access to the content type collection data.

I tried to use the JWT token (the way you show) to access my API but it gave me a request fail.

and to @georgezhang, the request is deprecated in V4 too.

[Strapi v4]