Hello i tried to create account by SDK but told me failed host name however application add to cloud.appwrite success . and package name ia true .
What's the endpoint you used for initializing client in your code?
Cloud.appwrite.io
@safwan Cloud.appwrite.io
؟؟
you mean https://cloud.appwrite.io/v1 ?
@Maniac_Fighter yes
Can you share the relevant code?
@Maniac_Fighter ok min
Here is my code
Let's do one thing,
Initialise your client object once( it's fine if you keep it global). Make sure you set all these things before passing the object to other services
so instead of the above do something like this
final Client client = Client().setEndpoint("YOUR_ENDPOINT").setProject("YOURPROJECTID");
Then
Account account = Account(client);
You should pass the object only after you initialised the client properly.
No need for setSelfSigned and addHeader . SetSelfSigned is depreceated now
No need to add headers as the SDK automatically adds this for you
Ok i will try now
@Maniac_Fighter thank you very much but when remove header give me unauthorized_scope
create method only creates a new account in the cloud. It does not create a new session. You need to call the https://appwrite.io/docs/client/account?sdk=web-default#accountCreateEmailSession then you could update the prefs
oops, realised I sent the same links as Biswa
@Maniac_Fighter I need to store role in prefs in create account to check account role
@Maniac_Fighter i will store in database collectiob better then call it when signin
Recommended threads
- [SOLVED] curl error Number: 6 — function...
Hello, I invested a lot of time in this error in a fresh install of appwrite 1.8.1 and lasted until fix, this if for helping anyone that can have the same weird...
- android platform invaild origina
It happened today suddenly. Our app says invalid origin. And appwrite cloud says every time we tried to add the app to it: "param platformId" is not optional.
- Team invite - 500 error - no email
When executing ```dart await _repository.teams.createMembership( teamId: event.listId, roles: ['member'], email: event.email, url: 'xxxx', ); ``` I se...