Authentication
Validate project key
Authenticate a project key and receive the caller's identity plus the project and organization it is scoped to. Fields are returned flat, not nested. Project keys are locked to the first device that uses them, so a key used from anywhere else is rejected with 403 and a `code` of device_mismatch.
POST
/api/v1/auth/validate-keyResponse
json
{
"valid": true,
"userId": "3f1a0c52-9c1e-4f0a-9a1b-7d2e5c8b4a10",
"userName": "Sarah Chen",
"userAvatarUrl": null,
"projectId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"projectName": "MyGame",
"projectSlug": "mygame",
"projectIconUrl": null,
"orgId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"orgName": "My Studio",
"orgSlug": "my-studio"
}Examples
curlbash
curl -X POST https://usourcecontrol.com/api/v1/auth/validate-key \
-H "Authorization: Bearer usc_your_project_key" \
-H "Content-Type: application/json"Try it
Try itChanges data
POST/api/v1/auth/validate-key
Kept in this tab only, sent straight to the API, and never to our servers. Create one in your project’s settings.
This is a POST request against the live API. It will really run, on the real project the key belongs to.