Skip to content

Commit 7f44e0d

Browse files
committed
fix : updated content
1 parent c7404d0 commit 7f44e0d

File tree

1 file changed

+92
-1
lines changed

1 file changed

+92
-1
lines changed
Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,92 @@
1-
## Postman
1+
# Postman
2+
3+
## OAuth Access Token
4+
5+
### Steps
6+
7+
1. Install [Postman](https://www.getpostman.com/downloads/)
8+
9+
2. Open Postman
10+
11+
3. Create a `new request`.
12+
13+
![pm-1](../Images/PM_1.png)
14+
15+
4. Click on `Authorization` and select `OAuth 2.0` from Type dropdown menu.
16+
17+
![pm-2](../Images/PM_2.png)
18+
19+
5. Click on `Get New Access Token`.
20+
21+
![pm-3](../Images/PM_3.png)
22+
23+
6. Copy your `API Key (Client ID)`, `Client Secret` and the `Default Redirect URI` from your Adobe Developer Console integration and paste it in the Postman `GET NEW ACCESS TOKEN` window. Assuming you are trying to get an access token for Adobe Analytics use below for scope:
24+
```
25+
openid,AdobeID,read_organizations,additional_info.projectedProductContext,additional_info.job_function
26+
```
27+
28+
*Note: If you are not sure about scope, refer to [Scope Reference](../OAuth/Scopes.md).*
29+
30+
![pm-4](../Images/PM_4.png)
31+
32+
7. You will be prompted for login by Adobe. Login using your Adobe ID.
33+
34+
![pm-5](../Images/PM_5.png)
35+
36+
8. Your access token will be generated.
37+
38+
![pm-6](../Images/PM_6.png)
39+
40+
## JWT Access Token
41+
### Steps
42+
1. Go to [Adobe Developer Console](https://developer.adobe.com/console)
43+
44+
2. Open the Service Account Integration for which you want to generate an access token.
45+
46+
![pmj-1](../Images/PM_JWT_1.png)
47+
48+
3. Click on the JWT tab, paste the entire private key file content including the `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` and click on `Generate JWT`.
49+
50+
![pmj-2](../Images/PM_JWT_2.png)
51+
52+
4. Copy the `Sample CURL command` and open Postman. (*Mac and Linux user can also paste the CURL command in terminal and get the access token.*)
53+
54+
![pmj-3](../Images/PM_JWT_3.png)
55+
56+
5. Click on `Import` -> `Paste Raw Text` and paste the CURL command.
57+
58+
![pmj-4](../Images/PM_JWT_4.png)
59+
60+
6. Click on `Send`. You will receive an access token.
61+
62+
![pmj-5](../Images/PM_JWT_5.png)
63+
64+
## CURL Requests in Windows
65+
66+
In API Documentation, sample CURL requests are common and helpful for the developers. Mac and Linux terminals are capable of executing such CURL requests but the Windows command prompt doesn't support it out of the box.
67+
68+
For windows users, you can follow below steps to execute the CURL requests easily by using Postman.
69+
70+
### Steps
71+
72+
1. Copy the CURL Request.
73+
e.g.
74+
```
75+
curl https://stock.adobe.io/Rest/Media/1/Search/Files?locale=en_US%26search_parameters%5Bwords%5D=kittens
76+
-H 'x-api-key:myAPIKey'
77+
-H 'x-product:myTestApp1.0'
78+
```
79+
80+
2. Open Postman. Click `Import` -> `Paste Raw Text` -> Paste the CURL request.
81+
82+
![pmw-1](../Images/PMW_1.png)
83+
84+
3. Go to `Headers` tab and replace `myAPIKey` with your actual API Key from Adobe Developer Console integration for Adobe Stock.
85+
86+
![pmw-2](../Images/PMW_2.png)
87+
88+
4. Click Send. You will receive a response.
89+
90+
![pmw-3](../Images/PMW_3.png)
91+
92+
*Note: You can import any CURL Request into Postman by following the above steps.*

0 commit comments

Comments
 (0)