Back

Otp authontication does not work, help me please

  • 0
  • Flutter
SELIM HÜR
4 Sep, 2023, 19:42

I have internet permission, I'm not getting any messages on my phone

TypeScript
      bool result = await InternetConnectionChecker().hasConnection;
      if (result == true) {
        print('Internet');
      } else {
        print('No internet :frowning: Reason:');
        print(InternetConnectionChecker().hasConnection);
      }

      Client client = Client();
      client.setEndpoint('https://cloud.appwrite.io/v1').setProject('64ef18ed8758c1e4c074').setSelfSigned(status: true);

      final account = Account(client);

      final session = await account.createPhoneSession(userId: '905363890562', phone: '+905363890562');
      print(session);
    } on AppwriteException catch (ex) {
      print(ex.message);
    }```
TL;DR
User is experiencing issues with receiving OTP (one-time password) authentication SMS messages from a US phone number. They have checked their phone carrier and confirmed that they can receive messages in Turkey. The user wonders if their phone needs to be internationally accessible, but it seems they have ruled out that possibility. The user also wonders if their carrier is blocking/filtering the SMS, but it appears that the SMS was not delivered due to a problem with the handset, signal, or mobile carrier network. The user ensures that their phone number is correct and asks if the issue could be related to the clock or an incorrect expiry date. They question why they are
Drake
4 Sep, 2023, 19:53

FYI, it's best to wrap code in backticks to format a bit nicer. You can use 1 backtick for inline code (https://www.markdownguide.org/basic-syntax/#code) and 3 backticks for multiline code (https://www.markdownguide.org/extended-syntax/#syntax-highlighting.

Drake
4 Sep, 2023, 19:53

it's expected for secret to be empty after making the api call. The secret will come in the SMS

SELIM HÜR
4 Sep, 2023, 20:00

why i dont receive any SMS

Drake
4 Sep, 2023, 20:02

incorrect phone number?

SELIM HÜR
4 Sep, 2023, 20:04

no my number is correct +90 536 389 05 62, can it be caused by the clock, expiry date is in the past

Drake
4 Sep, 2023, 20:05

nope. i can see we tried to send the SMS, but it was undelivered by the carrier network.

usually this is a problem with handset off, no signal, device can't receive SMS, problem with mobile carrier

Drake
4 Sep, 2023, 20:07

maybe your carrier is blocking/filtering the SMS? btw, the SMS should be coming from a US number

SELIM HÜR
4 Sep, 2023, 20:09

i can receive message in turkey, Does the phone have to be open abroad?

SELIM HÜR
4 Sep, 2023, 20:09

i will ask my phone carrier tomorrow, thank you so much

Drake
4 Sep, 2023, 20:09

like i said, the SMS will be coming from a US phone number, so you'll need to be able to receive SMS from US phone numbers

SELIM HÜR
4 Sep, 2023, 20:10

I understand, thank you very much for your help.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more