C#
// PUT /v1/webauthn/{webauthn_registration_id}
const stytch = require('stytch');
const client = new stytch.Client({
project_id: '${projectId}',
secret: '${secret}',
});
const params = {
webauthn_registration_id: "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name: "Google Passkey",
};
client.WebAuthn.Update(params)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });// PUT /v1/webauthn/{webauthn_registration_id}
package main
import (
"context"
"log"
"github.com/stytchauth/stytch-go/v18/stytch/consumer/stytchapi"
"github.com/stytchauth/stytch-go/v18/stytch/consumer/webauthn"
)
func main() {
client, err := stytchapi.NewClient(
"${projectId}",
"${secret}",
)
if err != nil {
log.Fatalf("error instantiating client: %v", err)
}
params := &webauthn.UpdateParams{
WebAuthnRegistrationID: "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
Name: "Google Passkey",
}
resp, err := client.WebAuthn.Update(context.Background(), params)
if err != nil {
log.Fatalf("error in method call: %v", err)
}
log.Println(resp)
}
// PUT /v1/webauthn/{webauthn_registration_id}
package com.example;
import com.stytch.java.common.StytchResult;
import com.stytch.java.consumer.models.webauthn.UpdateRequest;
import com.stytch.java.consumer.StytchClient;
public class Main {
public static void main(String[] args) {
StytchClient.configure("${projectId}", "${secret}");
UpdateRequest params = new UpdateRequest();
params.setWebAuthnRegistrationId("webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6");
params.setName("Google Passkey");
Object result = StytchClient.getWebAuthn().update(params);
if (result instanceof StytchResult.Success) {
System.out.println(((StytchResult.Success) result).getValue());
} else {
System.out.println(((StytchResult.Error) result).getException());
}
}
}// PUT /v1/webauthn/{webauthn_registration_id}
package com.example
import com.stytch.java.consumer.StytchClient
import com.stytch.java.consumer.models.webauthn.UpdateRequest
fun main() {
StytchClient.configure(
projectId = "${projectId}",
secret = "${secret}",
)
when (
val result =
StytchClient.webauthn.update(
UpdateRequest(
webauthnRegistrationId = "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name = "Google Passkey",
),
)
) {
is StytchResult.Success -> println(result.value)
is StytchResult.Error -> println(result.exception)
}
}
// PUT /v1/webauthn/{webauthn_registration_id}
const stytch = require('stytch');
const client = new stytch.Client({
project_id: '${projectId}',
secret: '${secret}',
});
const params = {
webauthn_registration_id: "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name: "Google Passkey",
};
client.webauthn.update(params)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });$response = $client->webauthn->update([
'webauthn_registration_id' => 'webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6',
'name' => 'Google Passkey',
]);# PUT /v1/webauthn/{webauthn_registration_id}
from stytch import Client
client = Client(
project_id="${projectId}",
secret="${secret}",
)
resp = client.webauthn.update(
webauthn_registration_id="webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name="Google Passkey",
)
print(resp)
# frozen_string_literal: true
# PUT /v1/webauthn/{webauthn_registration_id}
require 'stytch'
client = Stytch::Client.new(
project_id: "${projectId}",
secret: "${secret}"
)
resp = client.webauthn.update(
webauthn_registration_id: "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name: "Google Passkey"
)
puts resp// PUT /v1/webauthn/{webauthn_registration_id}
use stytch::consumer::client::Client;
use stytch::consumer::webauthn::UpdateRequest;
fn main() {
let client = Client::new("${projectId}", "${secret}").unwrap();
let resp = client.webauthn.update(
UpdateRequest{
webauthn_registration_id: "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name: "Google Passkey",
..Default::default()
}
).await;
println!("The response is {:?}", resp);
}# PUT /v1/webauthn/{webauthn_registration_id}
curl --request PUT \
--url https://test.stytch.com/v1/webauthn/webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6 \
-u '${projectId}:${secret}' \
-H 'Content-Type: application/json' \
-d '{
"name": "Google Passkey"
}'{
"request_id": "<string>",
"status_code": 123,
"webauthn_registration": {
"webauthn_registration_id": "<string>",
"domain": "<string>",
"user_agent": "<string>",
"verified": true,
"authenticator_type": "<string>",
"name": "<string>"
}
}{
"status_code": 401,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "unauthorized_credentials",
"error_message": "Unauthorized credentials.",
"error_url": "https://stytch.com/docs/api/errors/401"
}{
"status_code": 429,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "too_many_requests",
"error_message": "Too many requests have been made.",
"error_url": "https://stytch.com/docs/api/errors/429"
}{
"status_code": 500,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "internal_server_error",
"error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
"error_url": "https://stytch.com/docs/api/errors/500"
}Passkeys & WebAuthn
Update
Updates a Passkey or WebAuthn registration.
PUT
/
v1
/
webauthn
/
{webauthn_registration_id}
C#
// PUT /v1/webauthn/{webauthn_registration_id}
const stytch = require('stytch');
const client = new stytch.Client({
project_id: '${projectId}',
secret: '${secret}',
});
const params = {
webauthn_registration_id: "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name: "Google Passkey",
};
client.WebAuthn.Update(params)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });// PUT /v1/webauthn/{webauthn_registration_id}
package main
import (
"context"
"log"
"github.com/stytchauth/stytch-go/v18/stytch/consumer/stytchapi"
"github.com/stytchauth/stytch-go/v18/stytch/consumer/webauthn"
)
func main() {
client, err := stytchapi.NewClient(
"${projectId}",
"${secret}",
)
if err != nil {
log.Fatalf("error instantiating client: %v", err)
}
params := &webauthn.UpdateParams{
WebAuthnRegistrationID: "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
Name: "Google Passkey",
}
resp, err := client.WebAuthn.Update(context.Background(), params)
if err != nil {
log.Fatalf("error in method call: %v", err)
}
log.Println(resp)
}
// PUT /v1/webauthn/{webauthn_registration_id}
package com.example;
import com.stytch.java.common.StytchResult;
import com.stytch.java.consumer.models.webauthn.UpdateRequest;
import com.stytch.java.consumer.StytchClient;
public class Main {
public static void main(String[] args) {
StytchClient.configure("${projectId}", "${secret}");
UpdateRequest params = new UpdateRequest();
params.setWebAuthnRegistrationId("webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6");
params.setName("Google Passkey");
Object result = StytchClient.getWebAuthn().update(params);
if (result instanceof StytchResult.Success) {
System.out.println(((StytchResult.Success) result).getValue());
} else {
System.out.println(((StytchResult.Error) result).getException());
}
}
}// PUT /v1/webauthn/{webauthn_registration_id}
package com.example
import com.stytch.java.consumer.StytchClient
import com.stytch.java.consumer.models.webauthn.UpdateRequest
fun main() {
StytchClient.configure(
projectId = "${projectId}",
secret = "${secret}",
)
when (
val result =
StytchClient.webauthn.update(
UpdateRequest(
webauthnRegistrationId = "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name = "Google Passkey",
),
)
) {
is StytchResult.Success -> println(result.value)
is StytchResult.Error -> println(result.exception)
}
}
// PUT /v1/webauthn/{webauthn_registration_id}
const stytch = require('stytch');
const client = new stytch.Client({
project_id: '${projectId}',
secret: '${secret}',
});
const params = {
webauthn_registration_id: "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name: "Google Passkey",
};
client.webauthn.update(params)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });$response = $client->webauthn->update([
'webauthn_registration_id' => 'webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6',
'name' => 'Google Passkey',
]);# PUT /v1/webauthn/{webauthn_registration_id}
from stytch import Client
client = Client(
project_id="${projectId}",
secret="${secret}",
)
resp = client.webauthn.update(
webauthn_registration_id="webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name="Google Passkey",
)
print(resp)
# frozen_string_literal: true
# PUT /v1/webauthn/{webauthn_registration_id}
require 'stytch'
client = Stytch::Client.new(
project_id: "${projectId}",
secret: "${secret}"
)
resp = client.webauthn.update(
webauthn_registration_id: "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name: "Google Passkey"
)
puts resp// PUT /v1/webauthn/{webauthn_registration_id}
use stytch::consumer::client::Client;
use stytch::consumer::webauthn::UpdateRequest;
fn main() {
let client = Client::new("${projectId}", "${secret}").unwrap();
let resp = client.webauthn.update(
UpdateRequest{
webauthn_registration_id: "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
name: "Google Passkey",
..Default::default()
}
).await;
println!("The response is {:?}", resp);
}# PUT /v1/webauthn/{webauthn_registration_id}
curl --request PUT \
--url https://test.stytch.com/v1/webauthn/webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6 \
-u '${projectId}:${secret}' \
-H 'Content-Type: application/json' \
-d '{
"name": "Google Passkey"
}'{
"request_id": "<string>",
"status_code": 123,
"webauthn_registration": {
"webauthn_registration_id": "<string>",
"domain": "<string>",
"user_agent": "<string>",
"verified": true,
"authenticator_type": "<string>",
"name": "<string>"
}
}{
"status_code": 401,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "unauthorized_credentials",
"error_message": "Unauthorized credentials.",
"error_url": "https://stytch.com/docs/api/errors/401"
}{
"status_code": 429,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "too_many_requests",
"error_message": "Too many requests have been made.",
"error_url": "https://stytch.com/docs/api/errors/429"
}{
"status_code": 500,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "internal_server_error",
"error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
"error_url": "https://stytch.com/docs/api/errors/500"
}Authorizations
Path Parameters
Response
Successful response