![](https://cdn.discordapp.com/avatars/569561967119958036/c78949f3873ed3967ae0102bf644bd91.webp)
Hi I'm suing the next code to sign in with a phone number
TypeScript
import 'package:appwrite/appwrite.dart';
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('MY_PROJECT_ID') // Your project ID
;
Future result = account.createPhoneSession(
userId: ID.unique(),
phone: '+593999999999',
);
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}
But this code allways throws the next error
TypeScript
AppwriteException (AppwriteException: general_route_not_found, The requested route was not found. Please refer to the API docs and try again. (404))
[log] #0 ClientMixin.prepareResponse (package:appwrite/src/client_mixin.dart:73:9)
#1 ClientIO.call (package:appwrite/src/client_io.dart:383:14)
<asynchronous suspension>
#2 Account.createPhoneToken (package:appwrite/services/account.dart:1084:17)
TL;DR
Developers encountering an error with `createPhoneToken` in Flutter should check their SDK version if using Appwrite Cloud. The issue is likely due to an incorrect SDK version. The provided code snippet may throw a `general_route_not_found` error indicating a 404 status code when trying to create a phone session. To resolve this, developers should ensure they are using the correct Flutter SDK version compatible with Appwrite Cloud. ![](https://cdn.discordapp.com/avatars/186656408450629633/ca3bdd514fde110c200d8e9cff0c1328.webp)
If you're using appwrite cloud, you're probably on the wrong version of of the flutter SDK.
Recommended threads
- AppwriteException: general_unknown_origi...
Hii all <:KannaWave:657059003410677761> I'm trying to build an simple signup page with dart/flutter and appwrite.. So I'm using Android Studio. Added my flutte...
- Disallow personal data not working when ...
Hey, I'm running into an issue with the "disallow personal data in passwords" setting when resetting passwords through my Flutter app. I've enabled the option ...
- Appwrite Storage Related Issue
I/flutter ( 1784): Error updating profile image: AppwriteException: , ClientException with SocketException: Connection reset by peer (OS Error: Connection reset...
![](/images/bgs/pre-footer.png)