---
title: "Test another user's Google Earth Engine credentials (Admin only)."
method: POST
path: "/api/v1/user/{user_id}/gee-credentials/test"
---

# Test another user's Google Earth Engine credentials (Admin only).

`POST /api/v1/user/{user_id}/gee-credentials/test`

**Authentication**: JWT token required
**Authorization**: ADMIN or SUPERADMIN role required

**Path Parameters**:
- `user_id`: Target user's ID (string or integer)

**Prerequisites**:
- Target user must have GEE credentials configured

**Response Schema (Success)**:
```json
{
  "message": "GEE credentials for user user@example.com are valid and working"
}
```

**What This Tests**:
- Initializes Google Earth Engine with the user's credentials
- Verifies credentials are not expired
- Confirms GEE API access is working
- Validates credential format and permissions

**Admin Use Cases**:
- Validate credentials after setup/update
- Troubleshoot user access issues
- Periodic credential health checks
- Pre-execution validation for GEE scripts

**Error Responses**:
- `400 Bad Request`: No GEE credentials or credentials are invalid/expired
- `401 Unauthorized`: JWT token required or invalid
- `403 Forbidden`: Admin access required
- `404 Not Found`: Target user not found
- `500 Internal Server Error`: Failed to test credentials

## Path parameters

- `user_id` string, required

## Request body

- object

## Response `200`

Success

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/trends/apis/trends-earth-api.md) · [All operations](https://skmtc.dev/trends/apis/trends-earth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trends/trends-earth-api/revisions/6bdbc0b84666/schema)
