-
Notifications
You must be signed in to change notification settings - Fork 18
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
[Bug]: Get Apps requires user key but get an app requires API Key #91
Comments
Hi @PrinzJuliano,
Apologies for the confusion here. To clarify, the
Thanks for pointing that out, I agree that it can be confusing so I will surface this with our team to get it sorted out.
The SDK does not require a REST API key in order to view all apps or a single app. Please confirm that you are using a key generated from your organization's Key & IDs dashboard for the |
Well, to clarify: Right now, the SDK uses I hope this helps. |
Thanks for the clarification. I discussed this a bit in #84 (comment). The summary is that we will be standardizing the prefix in the future but in the meantime, know that the requests will still work regardless of the prefix that's currently being used.
To clarify: you tested the endpoints using the postman collection with the keys from your example and they both resolved to 200s? Or did you face similar issues using the postman collection? |
I faced similar issues. The Get all Apps endpoint requires a different key than the get app by id endpoint. The Node SDK will use the user key for both. |
Assuming you are using the (legacy) user auth key, this behavior matches the behavior outlined in our v9 docs [1][2]. However, if you look at our v11 docs [1][2] (which more corresponds to v5.0.0-alpha-02), both endpoints accept the My best recommendation is to generate a rich auth org key and use that in place of your |
What happened?
While debugging a 403 error, I noticed an inconsistency in the Docs:
The View Apps Endpoint
https://api.onesignal.com/apps
requires theBasic YOUR_USER_AUTH_KEY
whilehttps://api.onesignal.com/apps/{app_id}
requires theKey YOUR_ORGANIZATION_API_KEY
.In the documentation https://documentation.onesignal.com/reference/view-apps this is flipped.
Regardless of that, why do I require the REST API key to view a single app, while needing the User Key to view all?
I cannot use the User Key to view a single app.
Right now this is wrong in the API Implementation 5.0.0-alpha-02 as well.
When setting the default Auth parameter, the getApp method will work, but of course, any api request that uses the USER Key will fail.
Steps to reproduce?
What did you expect to happen?
Both API Requests should resolve to a 200 Ok using the right Authentication Methods and yield the requested data.
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: