Back

[SOLVED] Question about sending a verification mail

  • 0
  • Self Hosted
  • Apple
vollzeitemo
26 Nov, 2023, 16:38

Hi, I am currently working on the mail verification in my app. I created a function which is responsible for sending a verification link via mail. I wrote the function in python and tried to use in my swift code. The problem I have now is, that the terminal is prompting an error Failed to send verification email. Error: User (role: guests) missing scope (account) this is a print statement, which I have added to my swift code to see if the mail was successfully sent. I have set the permission, who can access this function to any . Does anybody have an idea if there is still something wrong with the permissions?

TL;DR
User is experiencing an issue with sending a verification mail and receives the error "Failed to send verification email. Error: User (role: guests) missing scope (account)". They have created a function in Python and tried to use it in their Swift code. The function has permission set to "any". They are asking for assistance in identifying any potential issues with the permissions. The issue was solved by realizing that the `createSession` function is not available in the Apple SDK. Solution: Use the provided documentation link for guidance.
vollzeitemo
26 Nov, 2023, 16:39

If needed I could make the swift code and the code of the created function available

ideclon
26 Nov, 2023, 16:39

What are you doing in the Function?

Drake
26 Nov, 2023, 16:40

Why can't you make the create verification call in your app?

vollzeitemo
26 Nov, 2023, 16:41

Here is my created function:

vollzeitemo
26 Nov, 2023, 16:43

Unsure, the account is created successfully, and then I am trying to call the create verification function and there I get the catch case which prompts the error: Failed to send verification email. Error: User (role: guests) missing scope (account)

Drake
26 Nov, 2023, 16:43

role: guests means you're not logged in. You need to create a session

vollzeitemo
26 Nov, 2023, 16:46

Does the apple sdk provide a function to create a session already or do I have to create one on the server side?

Drake
26 Nov, 2023, 16:51

Yep, there is

vollzeitemo
26 Nov, 2023, 16:54

Ah, now I know what my issue was. I tried to call createSession but this is not available the apple sdk. Thanks for the documentation link! 👍

vollzeitemo
26 Nov, 2023, 16:59

[SOLVED] Question about sending a verification mail

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