Save the JWT as a variable
創建一個 global variable.
先在Postman你的登錄API中,打開 test Tab。
輸入下面的代碼
const response = pm.response.json();
pm.globals.set("jwt_token", response.access_token);
使用 Global variable
在 REST API 的 Authentication tab 中,使用變量。
{{jwt_token}}
使用
先 Send 一次 Login API,然後再訪問其他 REST API 即可。