updatePhoneVerification method

Future<Token> updatePhoneVerification({
  1. required String userId,
  2. required String secret,
})

Create Phone Verification (confirmation)

Use this endpoint to complete the user phone verification process. Use the userId and secret that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.

Implementation

Future<models.Token> updatePhoneVerification(
    {required String userId, required String secret}) async {
  const String path = '/account/verification/phone';

  final Map<String, dynamic> params = {
    'userId': userId,
    'secret': secret,
  };

  final Map<String, String> headers = {
    'content-type': 'application/json',
  };

  final res = await client.call(HttpMethod.put,
      path: path, params: params, headers: headers);

  return models.Token.fromMap(res.data);
}