---
title: "Complete CLI Authentication"
description: "Set the refresh token for a CLI authentication session using the login code."
api: "POST /api/v1/auth/cli/complete"
---
## Request
The secret server key for authentication.
The project ID.
The login code that was presented to the user during the CLI authentication initiation.
## Response
A successful response indicates that the CLI authentication session has been completed and the refresh token has been set.
```bash cURL
curl -X POST 'https://api.stack-auth.com/api/v1/auth/cli/complete' \
-H 'Content-Type: application/json' \
-H 'x-stack-secret-server-key: YOUR_SECRET_SERVER_KEY' \
-H 'x-stack-project-id: YOUR_PROJECT_ID' \
-d '{
"login_code": "ABCD-1234"
}'
```
```json 200 Response
{}
```