I don't understand exactly your problem.
If the problem is that Moodle editor doesn't convert it automatically to a link, that is because it uses a non-standard protocol and it includes links inside it, you will need to make it a link yourself using the anchor HTML tag. That is, you will need to put HTML code like this:
<a href="moodlemobile://https://email@example.com?token=TOKEN&privatetoken=PRIVATETOKEN&redirect=http://domain.com/course/view.php?id=2">Open the course in the Moodle App</a>
If you're generating that code from PHP then I'm not sure how it's done, but I guess there's a function to create a link.