Updated OSDU-API-Quick-start-guide.md authored by Dzmitry Malkevich (EPAM)'s avatar Dzmitry Malkevich (EPAM)
...@@ -97,7 +97,7 @@ Open [Quick start](https://community.opengroup.org/osdu/documentation/-/wikis/up ...@@ -97,7 +97,7 @@ Open [Quick start](https://community.opengroup.org/osdu/documentation/-/wikis/up
![auth tab](./uploads/refi-qsg-img/kk-postman-auth-1.png) ![auth tab](./uploads/refi-qsg-img/kk-postman-auth-1.png)
Verify that following variables are set in Postman enviroment: Verify that following variables are set in Postman enviroment and this environment is selected as active (use dropdown in top right corner):
```text ```text
callback_url=https://developers.google.com/oauthplayground callback_url=https://developers.google.com/oauthplayground
auth_url=https://accounts.google.com/o/oauth2/auth auth_url=https://accounts.google.com/o/oauth2/auth
...@@ -106,8 +106,18 @@ Scope=email openid profile ...@@ -106,8 +106,18 @@ Scope=email openid profile
``` ```
Set `Type=OAuth 2.0` and scoll down to `Configure New Token` and press `Edit token configuration`. Set `Type=OAuth 2.0` and scoll down to `Configure New Token` and press `Edit token configuration`.
Set `Token Name`, `Grant Type=Authorization Code`, `Callback URL={{callback_url}}`, `Auth URL={{auth_url}}?access_type=offline&prompt=consent` Set
`Access Token URL={{Token_Fetch_URL}}`, `Client ID={{CLIENT_ID}}`, `Client Secret{{CLIENT_SECRET}}`, `Scope={{Scope}}`.
```text
Token Name=<any name you like>
Grant Type=Authorization Code
Callback URL={{callback_url}}
Auth URL={{auth_url}}?access_type=offline&prompt=consent
Access Token URL={{Token_Fetch_URL}}
Client ID={{CLIENT_ID}}
Client Secret{{CLIENT_SECRET}}
Scope={{Scope}}
```
![auth](./uploads/qsg-img/postman-auth.png) ![auth](./uploads/qsg-img/postman-auth.png)
...@@ -129,9 +139,17 @@ In `Manage access tokens` window scroll down to `refresh_token` section, select ...@@ -129,9 +139,17 @@ In `Manage access tokens` window scroll down to `refresh_token` section, select
![tokens](./uploads/qsg-img/postman-tokens.png) ![tokens](./uploads/qsg-img/postman-tokens.png)
Press `Use Token` button. Your just created token become active and switch `Auto-refresh token` id `On`
![current token](./uploads/qsg-img/postman-current_token.png)
Save the environment. Save the environment.
Now you could use `Refresh Token` requests from Postman collection to get new access tokens. Now you just need to ensure that `Authorization` for all requests and folders in collection are set to `Inherit auth from parent` and Postman will refresh token for you when needed
![inherit auth](./uploads/qsg-img/postman-auth-inherit.png)
You could still use `Refresh Token` requests from Postman collection to get new access tokens manually.
#### Obtaining `refresh_token` via Google OAuth 2.0 Playground #### Obtaining `refresh_token` via Google OAuth 2.0 Playground
... ...
......