comAtprotoSpaceConfirmRegistration function

Future<XRPCResponse<SpaceConfirmRegistrationOutput>> comAtprotoSpaceConfirmRegistration({
  1. required String space,
  2. required String token,
  3. required String challenge,
  4. required ServiceContext $ctx,
  5. String? $service,
  6. Map<String, String>? $headers,
  7. Map<String, String>? $unknown,
})

Confirm a new notification registration. Called by the space host on an endpoint passed to authorizeSpaceSync, before registering it. The syncing service checks that it issued the token for the space, and echoes back the challenge.

Implementation

Future<XRPCResponse<SpaceConfirmRegistrationOutput>>
comAtprotoSpaceConfirmRegistration({
  required String space,
  required String token,
  required String challenge,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.comAtprotoSpaceConfirmRegistration,
  service: $service,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {...?$unknown, 'space': space, 'token': token, 'challenge': challenge},
  to: const SpaceConfirmRegistrationOutputConverter().fromJson,
);