The Simple Push API, also known as the Push Notification API, provides apps the ability to be woken up to receive notifications. This API is currently available on Firefox OS only for any installed applications.
You can to request an endpoint from Mozilla by calling navigator.push.register()
:
https://updates.push.services.mozilla.com/update/TRIK7ggrpob9fThnJl7R6STMqQtPaAiwBjhOyMrDufDNzSgsmyVk9Qjk_RaTeXX382N2aMueqXO_5ZTNYEGPKvMdk8ITEMbasv2kZuu08N4wT_ZKTw==
What is the min/max length of the provided token (that's the path behind updates/
)?
Unfortunately, the token length fluctuates between 122
chars and 130
chars.
I need the information, to create a solid validator for my RESTful API.
The SimplePush API explicitly says that the returned URL is to be considered opaque, which means application developers should not be poking into its internals. This means there aren't any minimum or maximum lengths and any string that is a valid URL is a valid push identifier.
Note that third parties, including Firefox OS phone OEMs or carriers or even individual users are free to use their own push notification server for various reasons of efficiency or privacy, in which case the URL may not even have a mozilla.com domain, nor a similar structure update/<id>
.