Skip to main content
POST
/
v1
/
auth
/
webauthn
/
authentication
/
begin
Initiate WebAuthn Authentication (beta)
curl --request POST \
  --url https://api.moonkey.fun/v1/auth/webauthn/authentication/begin \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "domain": "localhost",
  "user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2"
}'
{
  "public_key_credential_request_options": {
    "publicKey": {
      "challenge": "D9qznnlmk+o70AZ4IFF7zG1jUaRYzW1Z0dqZ2OEDGU4=",
      "timeout": 60000,
      "rpId": "localhost",
      "allowCredentials": [
        {
          "type": "public-key",
          "id": "AQfPElkPCEeuVoNqtVNAqi8nUNlE3gLKTZKzH9hTt0YQMCPGkRpMAV8ECi1Oexr1hBPYHj6B8E5O6n8Wqhu4Tkkq75wFIrmhnz5CB9NhSeIZZlzmeg=="
        },
        {
          "type": "public-key",
          "id": "AWvXz2Dx+I+te0xgEFpnYRFvakhELv/tEmlQ68137Rlcl6+ZN0/8PIqN6e+lN5sXFUy5+HJsdDFUaYgQoVf0ORLF1UIQnuthZi9a742mCzR9G72Bjg=="
        },
        {
          "type": "public-key",
          "id": "Aex6qH/dUebV6v43lypXMBWzi8Okem5kik0iL9IYAX3ixRcBrCqIiJR3lhzK2rnAV0jY9IcWQe3sGEeP9vLm6J/lzs9JwRMpZ2pa8aT8db6YiQFeOg=="
        }
      ],
      "userVerification": "discouraged"
    }
  },
  "user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2"
}

Authorizations

Authorization
string
header
required

Auth Platform API includes all the Auth related features. All Users, Phone Numbers, Emails, and OTPs are associated with an App as the container.

Endpoints only accept App's Secret API keys other than certain endpoints that are used client side or via SDK that accept the public_token.

Authentication using App Api Key

Header:

Authorization: Bearer {api_key}

Authenticated Request

curl \
-X GET https://api.moonkey.fun/v1/auth/users/user_24wFP9pDa9YiMJLun94iKykoZs2 \
-H "Authorization: Bearer sk_test_pRqweh3wvWmJAAVYv7Z0T5iPLzFM4ql0muoyQcjOxGeN3p1r"

Body

application/json
domain
string
required

Required Domain of the app that will be using WebAuthn to authenticate user.

Minimum length: 1
user_id
string
required

Required User ID of the user to initiate WebAuthn credential authentication.

Minimum length: 1

Response

200 - application/json

OK

public_key_credential_request_options
object
required
user_id
string
required
Minimum length: 1