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
Copy file name to clipboardExpand all lines: README.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,11 +33,12 @@ var dc = require('dc-management-sdk-js');
33
33
34
34
### Authentication
35
35
36
-
The content management API uses OAuth 2 to authenticate requests.
37
-
When creating an API client you can provide your API key and secret
36
+
The content management API uses either OAuth2 or Person Access Tokens (PAT) to authenticate requests.
37
+
38
+
When using OAuth 2 to create an API client you can provide your API key and secret
38
39
and the client will handle creating authentication tokens.
39
40
40
-
For assistance creating API credentials and configuring permissions please contact [Amplience Support](https://support.amplience.com/).
41
+
For assistance creating API credentials, PAT's and configuring permissions please contact [Amplience Support](https://support.amplience.com/).
41
42
42
43
```typescript
43
44
const client =newDynamicContent({
@@ -55,6 +56,22 @@ var client = new dc.DynamicContent({
55
56
});
56
57
```
57
58
59
+
Create a client using a PAT
60
+
61
+
```typescript
62
+
const client =newDynamicContent({
63
+
patToken: process.env.PAT
64
+
});
65
+
```
66
+
67
+
OR
68
+
69
+
```javascript
70
+
var client =newdc.DynamicContent({
71
+
patToken:process.env.PAT
72
+
});
73
+
```
74
+
58
75
### Making requests
59
76
60
77
The most common top level resources (such as Hub and ContentItem) can be requested directly by calling the appropriate method on the client instance. This will return a native promise that will yield the resource or an error (e.g. if you do not have permission to access the resource).
0 commit comments