createAuthenticators method
Future<TCreateAuthenticatorsResponse>
createAuthenticators({
- required TCreateAuthenticatorsBody input,
Create authenticators to authenticate requests to Turnkey.
Sign the provided TCreateAuthenticatorsBody with the client's stamp function and submit the request (POST /public/v1/submit/create_authenticators).
See also: stampCreateAuthenticators.
Implementation
Future<TCreateAuthenticatorsResponse> createAuthenticators({
required TCreateAuthenticatorsBody input,
}) async {
final body = packActivityBody(
bodyJson: input.toJson(),
fallbackOrganizationId: input.organizationId ??
config.organizationId ??
(throw Exception(
"Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
activityType: 'ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2',
);
return await request<Map<String, dynamic>, TCreateAuthenticatorsResponse>(
"/public/v1/submit/create_authenticators",
body,
(json) => TCreateAuthenticatorsResponse.fromJson(
transformActivityResponse(json, 'CreateAuthenticators')));
}