Quick way to grab valid JWT

I'm trying to test my backend with express.js and calling it through postman. Is there an easy way to grab a valid JWT for my login so i can pass it in the headers?
2 Replies
onderay
onderay6mo ago
Hey @aaronweb3 Yes, you can obtain a valid JWT for testing your backend with Postman. Here's a step-by-step guide: Set up a Postman environment and add your Kinde machine to machine app’s settings as environment variables, i.e. the domain, client_id, and client_secret from the application. Create a new collection called Kinde and add a request in it. Rename the request to client_credentials or whatever best describes your purpose. Go to the Authorization section and set the Type to OAuth 2.0 and ensure the Header Prefix is set to Bearer. In the Configure New Token > Configuration options section, set the Grant Type to Client Credentials. Enter the Access Token URL, using the domain variable you created above. For example, {{business_domain}}.kinde.com/oauth2/token. Enter the Client ID and Client Secret using the environment variables you created earlier or by copying them from the Kinde application. Set the audience to https://[yourdomain].kinde.com/api (replacing [your domain]). Go to the Headers tab and select Accept and ensure the value is application/json. In the Authorization section, select Get New Access Token. If it works, you should see a confirmation message. Select Proceed and then Use Token. You should now have the access token for making requests to the Kinde management API. Remember to replace <your_domain>, <client_id> and <client_secret> with your own details. We also made a video about this - https://youtu.be/xJCj0IeoB5g?si=WDzx_4KE2ADSgoQ1
Kinde
YouTube
Test the Kinde Management API with Postman
How to test the Kinde Management API with Postman. Narrated by David Bainbridge.
aaron_web3
aaron_web36mo ago
Thank you for this it's much appreciated