Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Web Services

New Developer
Posts: 12
Registered: ‎08-08-2013
My Device: Q10
My Carrier: Swisscom
Accepted Solution

"Stability" of encoded user names

We have an app where users can define their URL and credentials to use for the BB Enterprise Web Service API.


Now I'm wondering: that call I need to make to BWSUtil.getEncodedUserName - how often does that result really change? E.g. is that something that I could do *ONCE* when the user configures a new web service URL and credentials, and then just store that encoded user name for future use - or is this something that changes over time, e.g. every week or month or so?


I am trying to avoid having to make hundreds or thousands of unnecessary calls, but the docs aren't clear on whether that "encoding" stays the same (as long as the original user name and domain remain the same), or whether that's really something that changes over time.


Any information on this available?

Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: "Stability" of encoded user names

In general the encoding should not change, but that's not to say it will stay unchanged for things like BES upgrades, or could even be changed more regularly in the future. The BAS web console should make this call itself and it is the recommended approach to authenticating, so I would definitely recommend making the call for every time the user authenticates and then even making a BWS#echo() call to validate the user has authenticated successfully.

Goodbye everybody!