⌛ Known Webex service error: "Forbidden: User has excessive device registrations" - ponchotitlan/webex_web_calling_client GitHub Wiki
The Guest Issuer token provided for the usage of the demo is used to create an authentication token in order to register in the Webex Calling services. However, an authentication token has a limit of 750 connections. Although the TTL of this type of token is of 1 hour, depending on the usage within this time span it is possible to reach the maximum limit.
If the aforementioned happens, the following error will be triggered the next time an authentication token attempts to register:
Forbidden: User has excessive device registrations
POST https://wdm.a8.ciscospark.com/wdm/api/v1/devices
WEBEX_TRACKING_ID: webex-js-sdk_[XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX]
If this error is received, the current authentication token will not be able to register in the Webex Calling services, hence the app will not work.
In order to avoid this situation, a DELETE request must be sent to the Webex Calling service in order to purge the registered devices list and enable registration.
The DELETE request will not cause any call interruption.
In order to send this request, it is first required to have the authentication token available. Given that the source code of this demo exchanges the Guest Issuer token for the authentication one without exposing it, it is necessary to make a POST API call before the DELETE one.
Hence, the first API call is for exchanging the Guest Issuer token for an Authentication Token that we can use:
curl --request POST --header "Authorization: Bearer {guest_issuer_token}" https://api.ciscospark.com/v1/jwt/login
Once the call is completed successfully. It is necessary to extract the result.token string and use it in the following DELETE call:
curl --request DELETE --header "Authorization: Bearer {guest_access_token}" https://idbroker.webex.com/idb/oauth2/v1/tokens/me?authtoken=true
The successful completion of the call means that the devices have been purged. It is possible afterwards to attempt registration to the Webex Calling Services again.