Bearer token in postman

后端 未结 4 2082
眼角桃花
眼角桃花 2021-02-06 21:40

I want to set a Bearer Token in postman

For some reason my Postman doesn\'t have the Bearer Token option in the Auth dropdown

4条回答
  •  醉梦人生
    2021-02-06 22:26

    I am using Postman v7.0.9.

    Add accessToken variable to postman environmental variable.

    Then use Tests tab to write javascript.

    let jsonData = pm.response.json();
    let token = jsonData.accessToken;
    pm.environment.set('accessToken', token);
    

    If you are usign the current version "Bearer Token" type is under Authorization tab.

提交回复
热议问题