You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -37,13 +38,21 @@ The product profile selection works the same way as it does for Service Account
37
38
38
39
Generating access tokens for experimentation with the OAuth Server-to-Server credential is straightforward. You can use the 'Generate access token' button on the credential overview page or copy the cURL command and use the command line to generate an access token for quick use.
Your integration can generate access tokens when needed. However, it is a good practice to cache access tokens for reuse until they expire. Integrations should avoid generating a new access token when a previously generated access token has not expired and can be reused. Adobe can throttle your integration if it generates too many access tokens.
54
+
55
+
Access tokens usually expire in 24 hours. To check the expiry time of an access token, see the `expires_in` field in the API response returned by the above cURL request. Note: The `expires_in` time is in seconds. See [API reference](./IMS.md#fetching-access-tokens).
47
56
48
57
### Generating access tokens using standard OAuth2 libraries
49
58
@@ -96,42 +105,42 @@ Follow the steps below to rotate client secrets programmatically for the OAuth S
96
105
1. Add I/O Management API to your project: This API allows your credential to read, add, and delete its client secrets.
97
106
98
107
2. Go to the OAuth Server-to-Server credential overview page and grab the URL. For example -
5. Generate an access token using the existing client secret (see the section on [generating access tokens](#generate-access-tokens)). Make sure to include scopes that the I/O Management API requires:
6. Call the API to list all existing client secrets. Note: you can grab your `client_id` from the OAuth Server-to-Server credential overview page.
121
130
122
-
```curl
123
-
curl -X GET 'https://api.adobe.io/console/organizations/{orgId}/credentials/{credentialId}/secrets' \
124
-
-H 'Authorization: Bearer {ACCESS TOKEN GENERATED IN STEP 5}'
125
-
-H 'x-api-key: {CLIENT ID FROM STEP 6}'
126
-
```
131
+
```curl
132
+
curl -X GET 'https://api.adobe.io/console/organizations/{orgId}/credentials/{credentialId}/secrets' \
133
+
-H 'Authorization: Bearer {ACCESS TOKEN GENERATED IN STEP 5}'
134
+
-H 'x-api-key: {CLIENT ID FROM STEP 6}'
135
+
```
127
136
128
-
1. Call the API to add another client secret to your credential. The API response contains the `client_secret` that was added and its `uuid`. This `client_secret` will never be returned in plain text by any other API response. However, you can still find it on the Developer Console UI.
137
+
7. Call the API to add another client secret to your credential. The API response contains the `client_secret` that was added and its `uuid`. This `client_secret` will never be returned in plain text by any other API response. However, you can still find it on the Developer Console UI.
129
138
130
-
```curl
131
-
curl -X POST 'https://api.adobe.io/console/organizations/{orgId}/credentials/{credentialId}/secrets' \
132
-
-H 'Authorization: Bearer {ACCESS TOKEN GENERATED IN STEP 5}'
133
-
-H 'x-api-key: {CLIENT ID FROM STEP 6}'
134
-
```
139
+
```curl
140
+
curl -X POST 'https://api.adobe.io/console/organizations/{orgId}/credentials/{credentialId}/secrets' \
141
+
-H 'Authorization: Bearer {ACCESS TOKEN GENERATED IN STEP 5}'
142
+
-H 'x-api-key: {CLIENT ID FROM STEP 6}'
143
+
```
135
144
136
145
8. Update your application to use the new client secret.
137
146
@@ -140,8 +149,8 @@ curl -X POST 'https://api.adobe.io/console/organizations/{orgId}/credentials/{cr
140
149
10. Call the API to delete the old client secret from your credential by passing the `uuid` in the URL
141
150
142
151
143
-
```curl
144
-
curl -X DELETE 'https://api.adobe.io/console/organizations/{orgId}/credentials/{credentialId}/secrets/{uuid from step 9}' \
145
-
-H 'Authorization: Bearer {ACCESS TOKEN GENERATED IN STEP 5}'
146
-
-H 'x-api-key: {CLIENT ID FROM STEP 6}'
147
-
```
152
+
```curl
153
+
curl -X DELETE 'https://api.adobe.io/console/organizations/{orgId}/credentials/{credentialId}/secrets/{uuid from step 9}' \
154
+
-H 'Authorization: Bearer {ACCESS TOKEN GENERATED IN STEP 5}'
0 commit comments