Skip to content
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

Use New API URL #196

Open
ejunker opened this issue Nov 27, 2024 · 5 comments
Open

Use New API URL #196

ejunker opened this issue Nov 27, 2024 · 5 comments

Comments

@ejunker
Copy link

ejunker commented Nov 27, 2024

OneSignal has a new base API URL

According to their API documentation:

Make sure your API requests are using https://api.onesignal.com and not the legacy https://onesignal.com/api/v1/ URL.

It looks like this would need to be updated in OneSignalClient.php

@mass5
Copy link
Contributor

mass5 commented Jan 11, 2025

my #197 PR should fix this

@lcon91
Copy link

lcon91 commented Jan 21, 2025

I think this feature should be resolved with an optional variable, avoiding problems with using ^2.x composer.
This change broke my homolog environment. Fortunately, it did not got to production.
If people using this lib have to change it's own environment, it is not a minor change.

@mass5
Copy link
Contributor

mass5 commented Jan 21, 2025

Thanks for the feedback @lcon91 I'm glad you found a way to fix your issue.
Are you aware that on the 1st of March 2025 all the legacy user API keys will be deprecated? What this means is that if you don't update your keys with the new URL, it will stop working. From what I understand, you have 1 month left. Is this correct? Can you confirm?

@lcon91
Copy link

lcon91 commented Jan 21, 2025

Actualy I wasn't, but there's a way to work with this solution without having to force a new variable in environment.
The const that had been removed might be changed with the new URL and then could've been used an optional parameter in the constructor or, even better, inside the constructor it could've been used a variable that use the env variable OR use the const when the env var didn't exist.

For this solution, the new lib version had to be 3.0, since it require a new environment variable (breaking change)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants