Sending a magic link invite using SMS

Hi there,

In the B2B application there is a way to create a magic link that sends an invite to the user through their email address, and when the user accepts it, it creates an account for him. I’m a bit confused on how this can be done using SMS. I thought that using the Embeddable Magic Links endpoint in the consumer API, it’s possible to do the same, but upon a closer examination it doesn’t seem like this is the case. Is there such functionality?

Many thanks,
Udi

Hi Udi,
You are correct that embeddable magic links are not currently supported in Stytch’s B2B product.
Additionally, SMS is only available in B2B as a Secondary Authentication factor. This is because Stytch enforces strict email address verification for B2B Members as a security precaution.

To find an alternative solution, can you please expand on your use case? Specifically, how do you want your end users to identify themselves?

Thanks for the quick response.
I understand there is no way to do this in a B2B application, but I thought this would be possible using a Consumer application? If so, how?

To give more context: We’re building an application that would send magic links to users through SMS. Once the users click the link, they would be logged in to the application. That said, this would effectively be a one-time login - there’s no need to create a password, just the link should be sufficient. Is this possible to implement using Stytch?

Thanks,
Udi

Ah, thanks for the clarification!

Yes, this would be possible in the Stytch Consumer product.
A caveat:
You must first make a call to the Create User endpoint if a user with the provided phone number does not exist. This is because the Create Embeddable Link endpoint requires a user_id (an existing user).
Additionally, Embeddable magic links must be enabled for you by a Stytch employee. Please email support@stytch.com from an email address attached to your Stytch Workspace with a request to enable it, if you want to move forward.

Thanks! Unlike the B2B product, I couldn’t see an endpoint that seems to do that. Could you share which endpoints I need to use to do this?

No problem.
Endpoints needed: (click on endpoint for link)

Thanks again! That’s what I tried but I didn’t get a link that is sent (unlike the B2B counterpart which sends an email invite) - it just created a token. Was I doing something wrong?

The Create Embeddable Magic Link endpoint will not send anything to your users. It will only return a token that you can embed in your own SMS or emails for authentication. Please see this guide for additional detail.

Stytch does not currently support SMS Magic Links natively, but SMS One-time-passcodes are a viable alternative.

Thank you, this is very helpful!