# Why we need API authentication
Hello again! In this tutorial, we will protect a Laravel API with Laravel Sanctum. Sanctum is a small and light package. It gives each user a secret token. The user sends this token with every request, and Laravel knows who is calling.
Why do we need this? Think about a mobile app. The app talks to your server through an API. The server must be sure that the person is really who they say they are. A token solves this problem in a simple way.
What we will build
- A register and login endpoint that gives a token
- A protected route that needs the token
- A logout endpoint that deletes the token
- A quick test using curl
You can always read more in the Sanctum documentation. Let us begin, step by step.