Skip to content

docs: update auth key references to match public docs #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ use onesignal::models::{App, FilterExpressions, Notification, Player, Segment, S
### Define the constants. You can find all the values on the dashboard page of your app.
```rust
const APP_ID: &str = "<YOUR_APP_ID>";
const APP_KEY_TOKEN: &str = "<YOUR_APP_KEY_TOKEN>";
const USER_KEY_TOKEN: &str = "<YOUR_USER_KEY_TOKEN>";
const REST_KEY_TOKEN: &str = "<YOUR_REST_API_KEY>"; // App REST API key required for most endpoints
const ORG_KEY_TOKEN: &str = "<YOUR_ORGANIZATION_API_KEY>"; // Organization key is only required for creating new apps and other top-level endpoints

```

### Creating a configuration object:
```rust
fn create_configuration() -> Box<Configuration> {
let mut configuration = apis::configuration::Configuration::new();
configuration.app_key_token = Some(String::from(APP_KEY_TOKEN));
configuration.user_key_token = Some(String::from(USER_KEY_TOKEN));
configuration.app_key_token = Some(String::from(REST_KEY_TOKEN));
configuration.user_key_token = Some(String::from(ORG_KEY_TOKEN));
Box::new(configuration)
}
```
Expand Down