The Unloc App

The Unloc mobile App can be used by both, end users and Service Providers to open Locks. Here we will discuss how you can use it as a Service provider.

The integration of your solution with the Unloc app is actually quite straight forward; our goal was to have a
one-size-fits-all solution so you don't need to add any additional efforts on your end, that's why the Unloc app allows Unloc Keys to be used via URLs.

The only requirement is that the person providing the service has previously logged into the Unloc app using their mobile phone number, this way you can generate a Key for that specific User (which is the same as their mobile phone number).

Once you create a Key for the specific User on your solution, you then generate a URL containing the Key ID, the User ID (again, this is their mobile phone number), and a URL to be invoked once the "Unlocking process" is completed. This is known as an App Switch URL.

The App Switching flow.The App Switching flow.

The App Switching flow.

When the App Switch URL is followed, the following happens:

  1. The Unloc app is invoked
  2. The Unloc app uses both the Key ID and the User ID present in the App Switch URL to verify if they actually match on the Unloc Platform side. If they do, the Key for that Lock is fetched
  3. The person providing the service can use the Unloc app to open the Lock
  4. Once the Lock is opened, the redirect URL is invoked to continue the flow back on your solution


One of the benefits of using App Switch URLs is that they can be used from either a mobile or web app (via the device's browser) with the same result: the Unloc App is invoked ready to open the Lock.

The App Switch URL

The App Switch URL has the following format:<keyId>&userid=<mobilePhoneNumber>&redirect=<returnUrl>
Query parameterMeaning
idThe ID of the key to open.
useridThe invited user's mobile number in E.164 format.
redirectFor instance googlechrome://


If the user does not have the Unloc app installed on their device, then the App Switch URL will take the user to App Store (iPhone) or Play Store (Android).


URL Encoding Required

The + sign in the user's mobile number must be URL-encoded. For example, +15845551234 must be encoded as %2B15845551234


The following URL, when opened on an iPhone or an Android mobile, will launch the Unloc app and take the user directly to a given key. Once the Key is used, the Unloc App will launch Google Chrome.

Query parameters used in the example URL:

Query parameterValueNote
ide31d1213-ade5-4786-ab17-33637e602defThe ID of the key to open
userid%2B15845551234 URL-encoded phone number +15845551234
redirectgooglechrome:// After key usage, the Unloc app will redirect the user back to the Google Chrome mobile app.

App switching without key ID

The Unloc app can also be opened without specifying a Key ID. The app will then open on the front page of the app displaying all available Keys. This process will begin after visiting the following URL:

If the Unloc app is not installed in the device, then the device's application marketplace (App Store for iPhone or Google Play for Android) will open offering the user the option to download the Unloc app.

appSwitchOnly Keys

appSwitchOnly Keys are Keys that are not shown to the User on their Unloc app's Key list, so they can't interact with them directly; they rely on your implementation to perform an App switch process, after which the whole unlocking process remains unchanged.

Service Providers can add an appSwitchOnly: true entry to the body of their Key creation request to mark the Key so the Unloc app doesn't display it on the User's Key list.

Did this page help you?