After importing the Postman collection, we'll now need to setup an environment with your credentials for authorization purposes.
Pre-requisite: You'll need to be invited to your company's Opendock Organization as an Admin user before you can use the API. Please see the Invite User to Your Org article for further instructions.
Step 1: Configure Collection's Parent Folder Authorization Variable
Ensure that the collection's parent folder is setup correctly with the type being set to "Bearer Token" and the Token variable being set to "{{nova_access_token}}".
Step 2: Configure the Login Variables
Ensure the the Login endpoint has the email and password variables set to "{{nova_user_email}}" and "{{nova_user_password}}" respectively under the "Body" data.
Step 3: Create a Postman Environment
A) Click the "New" button and select "Environment".
B) Create and enter the variable values and save the new environment!
- nova_backend = https://neutron.opendock.com
- nova_user_email = youremail@example.com
- nova_user_password = yourpassword
- nova_access_token = (leave it blank)
Step 4: Put It All Together!
Once you've selected your new environment and clicked the "Send" button, you should be able to log in and get your access token!
NOTE: Your access_token should auto save in your environment every time you log in. This is because we have added a post-request script under the Test section of the Login endpoint.
This allows you to automatically send the access token with every other request in the collection because they should all inherit the authorization credentials from the parent folder.
Comments
0 comments
Please sign in to leave a comment.