# Users

> Documentation index: https://ridewithgps.com/api/v1/doc/llms.txt

OpenAPI specification for these endpoints: https://ridewithgps.com/api/v1/openapi/openapi_users.yaml

## Returns the current user

`GET /api/v1/users/current.json`

Returns information about the currently authenticated user

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `x-rwgps-api-key` | string | yes | API key for identifying the client application |
| `x-rwgps-auth-token` | string | yes | Authentication token for the user |

### Response `200`

| Name | Type | Description |
| --- | --- | --- |
| `user` | object |  |
| `user.id` | integer |  |
| `user.name` | string |  |
| `user.created_at` | date-time |  |
| `user.updated_at` | date-time |  |

### Errors

- `401` Unauthorized

### Example request

```bash
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/users/current.json
```

### Example response

```json
{
  "user": {
    "id": 123,
    "name": "Alex Rider",
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}
```
