Join video sessions with a short link
When a Contact Center agent uses the Zoom client to invite a user to an unscheduled video session, Contact Center
sends an invitation email containing a shortened link like https://shortlink.zoom.com/cc/bMefyOFPf to invite
the user to join the session. When the user opens or pastes that shortened link into your Contact Center app,
have your app route the URL to the handleShortLinkJoinOpenURL handler.
Configure URL handling
Call this function when the app receives the short link from either the clipboard or an app.
For a clipboard flow:
- Read the primary clip only when clipboard checking is enabled.
- Trim the text and reject an empty value or text longer than 512 characters.
- Ask the user to confirm before opening the link.
- (void)joinShortLinkVideoFromPasteboard {
NSString *shortLink = [UIPasteboard generalPasteboard].string;
NSURL *url = [NSURL URLWithString:shortLink];
if (shortLink.length <= 0 || !url) {
return;
}
BOOL success = [self handleShortLinkJoinOpenURL:url];
if (!success) {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Invalid Short Link" message:@"nil" preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:alert animated:YES completion:nil];
}
}
func onShortLinkVideoButtonClick() {
let shortLink = UIPasteboard.general.string ?? ""
guard !shortLink.isEmpty, let url = URL(string: shortLink) else { return }
let success = handleShortLinkJoinOpenURL(url)
if !success {
let alert = UIAlertController(title: "Invalid Short Link", message: nil, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "OK", style: .default))
self.present(alert, animated: true)
}
}
Handle the shortened link and join the video session.
Handle invalid or expired links
If handleShortLinkJoinOpenURL(url) returns false, the SDK didn't accept the link or couldn't start the flow.
Show a generic invalid-link message and do not open a video session.
A return value of true means that handling started. It does not guarantee that link resolution or joining
completed successfully. Later failures are delivered to onError.
If the SDK can't process the link, return false from your URL-handling path and execute this callback method.
When the SDK sends an error notification, your app can display a custom pop-up alert.