Bro, why did you put the verifyuser route in the web.php instead of api.php?
Godswill Aniakor

Because that route is accessed from the web browser and not from the app itself, when the user registers, a verification email is sent out with a link which is associated with that route.

You can put that route in api.php but make sure you add the ‘api’ prefix to the link in the verification email in Step 5.

<a href=”{{ url(‘api/user/verify’, $verification_code)}}”>Confirm my email address </a>

Like what you read? Give Moses Esan a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.