Cloudreve API Docs
  1. Passkey
Cloudreve API Docs
  • Site
    • Ping
      GET
    • Get CAPTCHA
      GET
    • Get site settings
      GET
  • Session
    • Token
      • Password sign-in
      • Finish sign-in with 2FA
      • Refresh Token
      • Sign out
    • OpenID
      • Prepare OpenID sign-in
      • Finish OpenID sign-in
      • Unlink OpenID
    • Passkey
      • Prepare Passkey sign-in
      • Finish Passkey sign-in
    • Prepare login
      GET
  • User
    • Passkey
      • Prepare passkey registration
        PUT
      • Finish passkey registration
        POST
      • Delete passkey
        DELETE
    • Setting
      • List available storage policies
      • List available nodes
      • Get preferences
      • Prepare enabling 2FA
      • Update preference setting
      • Update profile pricture
    • Sign up
      POST
    • Send reset password email
      POST
    • Reset password via temp link
      PATCH
    • Get profile picture
      GET
    • Get user
      GET
    • List user's share links
      GET
    • Get storage capacity
      GET
    • Search user
      GET
    • List credit changes
      GET
    • List payments
      GET
  • Callback
    • Complete OneDrive upload
      GET
    • Complete COS upload
      GET
    • Complete S3 upload
      GET
    • Complete OBS upload
      GET
  • Workflow
    • Remote Download
      • Create remote download
      • Select files to download
      • Cancel task
    • List tasks
    • Get task progress
    • Create archive
    • Extract archive
    • Relocate storage policy
    • Import external files
  • File
    • Permission
      • Set permission
      • Delete permission setting
    • Upload
      • Create upload session
      • Upload file chunk
      • Delete upload session
    • Pin
      • Pin to sidebar
      • Delete a pin
    • Version
      • Set file version
      • Delete file version
    • Direct Link
      • Create direct links
      • Delete direct link
    • List files
    • List file activities
    • Get file info
    • Get thumbnail URL
    • Update file content
    • Create viewer session
    • Create file
    • Rename file
    • Move or copy files
    • Create download URL
    • Restore from trash bin
    • Delete file
    • Force unlock
    • Patch metadata
    • Mount storage policy
    • Update view setting
  • Share
    • Create share link
    • Edit share link
    • Get share link info
    • List my share links
    • Delete share link
  • VAS
    • Payment
      • Create a payment
      • Get payment status
    • GiftCode
      • Check gift code
      • Redeem gift code
  • Group
    • List groups
  • WebDAV
    • List accounts
    • Create account
    • Update account
    • Delete account
  1. Passkey

Finish passkey registration

POST
/user/authn
Auth: JWT Required

Request

Authorization
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Body Params application/json
response
string 
required
JSON encoded CredentialCreationResponse with additional fields, see example for details.
u
string 
required
Name of the passkey. Available placeholders:
{os}: OS name parsed from ua;
{browser}: Browser name parsed from ua;
ua
string 
required
Client user agent.
Example
{
    "response": "{\"id\":\"7urNE_WTQSGqA06D0w-1Xw\",\"type\":\"public-key\",\"rawId\":\"7urNE_WTQSGqA06D0w-1Xw\",\"response\":{\"attestationObject\":\"o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YViUSZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2NdAAAAANVIgm55tNtAo9gREW9-g0kAEO7qzRP1k0EhqgNOg9MPtV-lAQIDJiABIVggg1lGbgriP72Ro5GpDhgyH_FwmxDFbg_9IAvb1kKqtuUiWCA-wxwgCMp5OVE0s0E8U7ZR-v9HcVr88onxRbauZDUD9A\",\"clientDataJSON\":\"eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiZnlFQ2I2aDh0bXZRcnZUV1p2Y05RZ0VUb08zMExqRHRmNzIxeUlHVTA0RSIsIm9yaWdpbiI6Imh0dHA6Ly9sb2NhbGhvc3Q6NTE3MyIsImNyb3NzT3JpZ2luIjpmYWxzZX0\"}}",
    "name": "{browser} on {os}",
    "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/user/authn' \
--header 'Content-Type: application/json' \
--data-raw '{
    "response": "{\"id\":\"7urNE_WTQSGqA06D0w-1Xw\",\"type\":\"public-key\",\"rawId\":\"7urNE_WTQSGqA06D0w-1Xw\",\"response\":{\"attestationObject\":\"o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YViUSZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2NdAAAAANVIgm55tNtAo9gREW9-g0kAEO7qzRP1k0EhqgNOg9MPtV-lAQIDJiABIVggg1lGbgriP72Ro5GpDhgyH_FwmxDFbg_9IAvb1kKqtuUiWCA-wxwgCMp5OVE0s0E8U7ZR-v9HcVr88onxRbauZDUD9A\",\"clientDataJSON\":\"eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiZnlFQ2I2aDh0bXZRcnZUV1p2Y05RZ0VUb08zMExqRHRmNzIxeUlHVTA0RSIsIm9yaWdpbiI6Imh0dHA6Ly9sb2NhbGhvc3Q6NTE3MyIsImNyb3NzT3JpZ2luIjpmYWxzZX0\"}}",
    "name": "{browser} on {os}",
    "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
}'

Responses

🟢200Success
application/json
Body
data
object (Passkey) 
required
Response content. In some error type, e.g. lock conflicting errors, this field wil present details of the error, e.g. who is locking the current file.
id
string 
required
ID of the passkey.
Example:
7urNE/WTQSGqA06D0w+1Xw==
name
string 
required
Name of the passkey platform.
Example:
Chrome on Mac OS X
used_at
string <date-time> | null 
optional
Datetime when the passkey is lastly used.
Example:
2025-06-13T10:43:09.929001+08:00
created_at
string <date-time>
required
Datetime when the passkey is created.
Example:
2025-06-13T10:43:09.929001+08:00
code
integer 
required
Response code.
0 - Success.
Default:
0
Example:
0
msg
string 
optional
Human readable error message (if any).
error
string  | null 
optional
Internal error message, only visable in debug mode.
correlation_id
string <uuid> | null 
optional
Correlation ID of the request. Only presented on failed reqeust.
Example:
b4351ecc-ee1a-4455-bc94-2c3dbcc58538
Example
{
    "code": 0,
    "data": {
        "id": "7urNE/WTQSGqA06D0w+1Xw==",
        "name": "Chrome on Mac OS X",
        "created_at": "2025-06-13T10:43:09.929001+08:00"
    },
    "msg": ""
}
Modified at 2025-06-27 03:07:53
Previous
Prepare passkey registration
Next
Delete passkey
Built with