Skip to content

Commit ada340d

Browse files
authored
Update docs for org auth
1 parent 2398eab commit ada340d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ You can configure auth parameters passing them like this:
6161

6262
```js
6363
const configuration = OneSignal.createConfiguration({
64-
userAuthKey: '<YOUR_USER_AUTH_KEY>',
65-
restApiKey: '<YOUR_REST_API_KEY>',
64+
userAuthKey: '<YOUR_ORGANIZATION_API_KEY>', // Organization key is only required for creating new apps and other top-level endpoints
65+
restApiKey: '<YOUR_REST_API_KEY>', // App rest api key required for most endpoints
6666
});
6767

6868
const client = new OneSignal.DefaultApi(configuration);
@@ -76,7 +76,7 @@ parameter. You can then use this to modify your configuration object and create
7676
const response = await client.createApp(newapp);
7777

7878
const configuration = OneSignal.createConfiguration({
79-
userAuthKey: '<YOUR_USER_KEY_TOKEN>',
79+
userAuthKey: '<YOUR_ORGANIZATION_API_KEY>',
8080
restApiKey: response.basic_auth_key,
8181
});
8282

@@ -586,4 +586,4 @@ Give a ⭐️ if this project helped you!
586586

587587
Copyright © 2023 [OneSignal](https://github.com/OneSignal).
588588

589-
This project is [MIT](https://github.com/OneSignal/node-onesignal/blob/main/LICENSE) licensed.
589+
This project is [MIT](https://github.com/OneSignal/node-onesignal/blob/main/LICENSE) licensed.

0 commit comments

Comments
 (0)