#(role: applications) missing scope (account) (401) createVerification

1 messages · Page 1 of 1 (latest)

frigid mirage
#

When attempting to create a verification, I get the following exception:
AppwriteException: general_unauthorized_scope, [email protected] (role: applications) missing scope (account) (401)

Implementation is as:

client.account.create(
                    userId: userId.value!,
                    email: email.value!,
                    password: password.value!,
                  );

                  final token = await server.account.createVerification(
                    url: 'https://cloud.appwrite.io/v1/wordmap',
                  );
                  print(token.secret);

The server client, I have initialised as:

final client = Client()
    .setEndpoint('https://cloud.appwrite.io/v1')
    .setProject('wordmap')
    .setSelfSigned(status: true)
    .setKey(
      'MY_KEY',
    );
glass gate
#

Is wordmap your project ID?

frigid mirage
#

It is indeed @glass gate

glass gate
#

Cool

#

In the first function
What is this url?
https://cloud.appwrite.io/v1/wordmap ?

frigid mirage
#

Should I even be using the dart client for creating a verification though? (confused with the whole flutter/dart client thing)

frigid mirage
glass gate
#

What is you're trying to achieve?
And yes you can send it from the flutter/dart

frigid mirage
#

So then either way, using the flutter or dart client - I still get permission/scope errors.

I'm just wanting to create an account and verify it.

glass gate
#

In flutter (All mobile) I think it mean that you'll have to create deep link logic

compact vessel
#

createVerification

frigid mirage
compact vessel
#

(role: applications) missing scope (account) (401) createVerification

frigid mirage
#

@compact vessel do I pass the appwrite cloud api endpoint as the URL?

late am.Session session;
                if (userId.value != null &&
                    email.value != null &&
                    password.value != null) {
                  final account = await client.account.create(
                    userId: userId.value!,
                    email: email.value!,
                    password: password.value!,
                  );

                  session = await client.account.createEmailSession(
                    email: email.value!,
                    password: password.value!,
                  );

                  final token = client.account.createVerification(
                    url: 'https://cloud.appwrite.io/v1',
                  );