Skip to content

Instantly share code, notes, and snippets.

@MaheKarim
Created March 3, 2024 11:20
Show Gist options
  • Save MaheKarim/93718ced9f51b5fb6c048d9abb269a7d to your computer and use it in GitHub Desktop.
Save MaheKarim/93718ced9f51b5fb6c048d9abb269a7d to your computer and use it in GitHub Desktop.
Postman Bearar Token Automation
// Parse the response JSON
var responseData = pm.response.json();
// Extract the access token from the response
var accessToken = responseData.data.access_token;
// Set the access token variable
pm.environment.set("access_token", accessToken);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment