Custom deltachat URL/URI SCHEME

Why

How (this section is in a draft state.)

There are two options that come to my mind about this:

Option A

Register an classical UrlScheme like deltachat:\\[payload] or dc:[payload]

Advantage:

  • Goes directly to the specified app
  • Doesn’t work if it’s not installed and registered by the app

Option B -Deeplinking

Register Deltachat as handler for https://delta.chat (or better for a subdomain like link.delta.chat) - urls.

Advantage:
We can display a fallback site that tells the user to download DC when they don’t have it.

Disadvantage:

  • might not work on old devices.
  • Puplic key gets send to a webserver when it’s in the url [*no concern if we could use an anchor for it]

We could also use booth, with A as a fallback -> can be used on the info site as a link. Also share-with-deltachat links like

<a href="dc://share?msg=Hey did you see this new blogpost at delta.chat">Share on Delta chat</a>

are better to implement without a fallback to the site in option B.

*using anchor for private key: anchors aren’t sent to the server, so private key/ email address can stay safe. Also js could read it, or giving a fallback link.( you click on dc link (option b); you don’t have dc, so the link gets opened in the browser and you get the fallback page that suggests you to download dc; after you downloaded dc you might have forgotten the link, so you come back to the fallback page which is still opened in you browser and on that fallback page there is also a link to open it in dc (probably the same link with the anchor and a fallback link for older devices) that knows the anchor information over clientside js)

2 Likes

Hey,
The description for Option B is missing (or?). Could you please write a line what is meant with option B?

I the information I forgott, any more questions / things I missed?

https://electronjs.org/docs/api/app#appsetasdefaultprotocolclientprotocol-path-args
(but I didn’t found out where it puts the parameter yet.)

for iOS:
https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app

It would be great to have invitation URL’s to join groups in addition with the QR codes. URL’s are more email friendly than a QR code. If the end user doesn’t have DC installed, they would get taken to the appropriate app store or web site.

This single feature is one reason WhatsApp is so popular (ease of entry).

On the latest deltachat-desktop this already works. There are still some bugs to fix, but in general it works. Sadly this is a very platform specific thing, so for example on linux it works quite well, mac encodes urls differently… But yes, I really like this feature. Also logging in to the forum via delta chat is really neat. Just clicking on the “manual link” option, it open delta chat, asks if i want to join the group and schwupp im logged in.

I’m not seeing a “Manual Link” option on Windows. Also, how would I create a link for others to use? Thanks. Is there any ability to create or use links in Android?

@Jikstra, nope we only support SecureJoin urls and urls to join unverified groups (also via secure join afaik). It is related, but not the same as deeplinking to an deltachat uri that shows a fallback website if deltachat isn’t installed.

I am unfamiliar with SecureJoin. I did a search for it and the results were less than explanatory. Am I correct in assuming SecureJoin is implemented solely through the QR code? Also, what is purpose of the encryption string below the QR code which begins with “OPENPGP4FPR”?

Thanks.

The SecureJoin Process is our technical term of the process of joining a verified group and the process to verify a contact. It uses the OPENPGP4FPR scheme.

That’s the data that the qr code is representing, its displayed there as fallback if you can’t scan the qr code.

So how would I use the fallback if the QR wasn’t working?

paste in the qr code or open it as link

OK…apologies for the ignorance, but where, exactly, would I paste the string? How would I open it as a link? I don’t see any functionality to do either of these within the app (desktop or Android).

DeltaChat desktop registers as a “url handler” for openpgp4fpr:// urls. So in most other programs if you click on such a link, deltachat should open (or a dialog if you want to open this link with deltachat). Otherwise you can paste the url from the clipboard in the qr scan dialog. Have a look at the screenshot:

1 Like