Session L614
...
Postman Overview
Access Token
api security overview to establish a secure api connection to an adobe product adobe provides the creation of an oauth server to server credential to do so you must first create a developer project within the adobe developer console in order to have access to the developer console you must have been assigned developer rights within the adobe admin console once you have these rights you can create developer projects utilizing the various adobe product related apis this is where the oauth server to server credential comes into play to generate an access token you must pass a certain set of claims to adobe's identity management service (ims) for oauth server to server credentials an example call would like so curl x post 'https //ims na1 adobelogin com/ims/token/v3?client id={client id}' \\ h 'content type application/x www form urlencoded' \\ d 'client secret={client secret}\&grant type=client credentials\&scope={scope} you can learn more about the e2e process for creating the developer project using oauth server to server credentials https //developer adobe com/developer console/docs/guides/authentication/servertoserverauthentication/implementation/#generate access tokens for the bootcamp we will "hand wave" this step of the process 😄 adobe experience platform + adobe ims every request to any adobe service must include the access token in the authorization header along with the client secret that was generated during the developer project creation additionally, the experience platform and its associated applications require two other header params are present on each request x gw ims org id this param specifies the ims org that the request belongs to and ensures the processing of the requests resolves to the appropriate saas environment x sandbox name this param specifics which sandbox to process the request in within the experience platform now that you understand a little bit about how adobe secures its api's and what is required to work them lets actually use them not specifying the x sandbox name param does not fail the request as you might expect instead it defaults the request to process into the default sandbox that is automatically provisioned with any experience platform environment as part of this bootcamp we created a developer project and provided you a postman environment file with all of the necessary values request an access token this is what you uploaded in the previous steps of the lab authenticate with postman launch postman and navigate to the directory titled ims authenticate and open the request by clicking on it and then under that click oauth access token next in the upper right corner of postman you'll see an environment drop down select the adobe summit l614 environment from the drop down now execute the call by clicking the “send” button a successful response should result in a 200 ok meaning you've successfully authenticated successful response { "token type" "bearer", "access token" "\<value>", "expires in" 86399979 } token type always will be of type bearer access token proves authorization and required in the authorization header of all api calls expires in milliseconds until the access token expires (24hrs expiration period today) congratulations! you've successfully authenticated and your access token is now saved to your environment file error if you forgot to set your postman environment in the previous steps you will see the following error this happened because you did not set your environment file to do so ensure you have selected if from the environment dropdown as shown below