Automatically login the user via link

I use the nextcloud API in my app. I use it to create the user accounts on nextcloud, for example. The users registers in my app and should not have to create their own Nextcloud password (my app does that for them). Now I want to send the user to the Nextcloud page via a link. Can I create the link so that the user is automatically signed in? So e.g. if I pass a token via URL parameter?