Password in URL validation

We are trying to use optical character recognition to scan the meeting URL from a calendar entry on a user’s phone screen. It works fairly well, but often the decoding is off by a single character (such as swapping “o” and zero).

Usually the URL includes the “pwd=” field so the user doesn’t need to enter a password.

Is there any way we can validate that password before we attempt to join? Is it always going to be a fixed number of digits? Is there a check digit? Can I validate without attempting to join?

If we could validate the password, we could leave the OCR scanner trying until it decodes a valid password. Then the user would immediately go to the correct meeting without a password prompt.

Thanks for any extra details I can get on the encoded password portion of the URL.

This is my best guess at validating the URL:

It can contain only:

  • capital letters
  • lowercase letters
  • period
  • colon
  • front slash
  • question mark
  • equals sign
  • ampersand

if (!possibleUrl.matches("[A-Za-z0-9.:/?=&]*")) {
Log.d(TAG, "OCR line contains non-URL characters");
continue;
}

It would be great to know if there are additional valid symbols used, and if those password tokens have an expected length or format. Does anyone have more information on this?