Skip to content

Commit a515d60

Browse files
author
OneSignal
committed
feat: add v2.2.0 package updates
1 parent e9b5195 commit a515d60

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
@@ -36,17 +36,17 @@ use onesignal::models::{App, FilterExpressions, Notification, Player, Segment, S
3636
### Define the constants. You can find all the values on the dashboard page of your app.
3737
```rust
3838
const APP_ID: &str = "<YOUR_APP_ID>";
39-
const APP_KEY_TOKEN: &str = "<YOUR_APP_KEY_TOKEN>";
40-
const USER_KEY_TOKEN: &str = "<YOUR_USER_KEY_TOKEN>";
39+
const REST_KEY_TOKEN: &str = "<YOUR_REST_API_KEY>"; // App REST API key required for most endpoints
40+
const ORG_KEY_TOKEN: &str = "<YOUR_ORGANIZATION_API_KEY>"; // Organization key is only required for creating new apps and other top-level endpoints
4141

4242
```
4343

4444
### Creating a configuration object:
4545
```rust
4646
fn create_configuration() -> Box<Configuration> {
4747
let mut configuration = apis::configuration::Configuration::new();
48-
configuration.app_key_token = Some(String::from(APP_KEY_TOKEN));
49-
configuration.user_key_token = Some(String::from(USER_KEY_TOKEN));
48+
configuration.app_key_token = Some(String::from(REST_KEY_TOKEN));
49+
configuration.user_key_token = Some(String::from(ORG_KEY_TOKEN));
5050
Box::new(configuration)
5151
}
5252
```

0 commit comments

Comments
 (0)