Closed lifenautjoe closed 1 year ago
Hey @lifenautjoe . We are really sorry to hear your experience with our library was so frustrating. This library and the documentation is generated by the OpenAPI generator. From the code you provided I think I can see the problem. In the documentation there is an example of how to properly setup Configuration object:
configuration = onesignal.Configuration(
app_key = "YOUR_APP_KEY",
user_key = "YOUR_USER_KEY"
)
It's only includes app_key
and user_key
, there is no api_key
though. Some of our endpoints require app level authorization and some require user level authorization. In the code you provided you setting up the app_key
as an APP_ID, which is incorrect, it should be the APP_KEY_TOKEN
.
Just in case here is how you can get those keys:
I sincerely hope this will help fix your issue. Please feel free to reopen this issue if you still have this problem.
What happened?
I've followed all your steps and after 4 hours of frustration, I decided to use another push notification service.
Steps to reproduce?
What did you expect to happen?
My simple notification would be sent, yet I get
I've made sure I'm doing everything exactly as per your documentation, I've tried everything on my end, but it seems that either your API is broken, or your SDK is.
In terms of your docs, they're also so overly complex.
People come looking for "How to send X notification to Y" not to get 100 classes definitions.
Sorry if I sound mean but I am quite annoyed at wasting an entire work day on this.
Relevant log output
No response
Code of Conduct
Edit
My API keys are not wrong.
In the end I just did the create notification call using
requests
and everything worked as expected.I'm convinced your sdk is broken.