Skip to content

Automate setting Secure Access API AccessToken in environment #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@
"item": [
{
"name": "Get Access Token",
"event": [
{
"listen": "test",
"script": {
"exec": [
"const jsonResponse = pm.response.json();",
"pm.environment.set(\"AccessToken\", jsonResponse.access_token);",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "basic",
Expand Down
2 changes: 1 addition & 1 deletion Cisco Secure Access/PostmanExamples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
![image](https://user-images.githubusercontent.com/11685750/163173840-a9c399ae-929f-4891-b298-b9321a12f023.png)
* Now generate an API access token:
1. Hit `Send` to generate a Cisco Secure Access API access token.
1. Add your new access token token to the `AccessToken` variable in the `Cisco Secure Access` Postman environment.
1. Your new access token should be automatically set in the `AccessToken` variable in the `Cisco Secure Access` Postman environment.

**Note:** Cloud Security API access tokens are valid for up to one hour. Once a token expires, you can go back an generate a new access token and plug it into the environment as demonstrated above.

Expand Down