aditya_uchihhaOriginal post
Web Developer
Error creating user: app.(my_project_id)@service.nyc.cloud.appwrite.io (role: applications) missing scope (account)
while trying to register a new user, and sending them email verification i set this. The user is being registered fine, but when the code runs for verification it gives error. And I also have already activated and enabled all the scopes.
here is my code:
@app.post("/auth")
def create_user(payload: RegisterInput):
try:
# Create the user
new_user = account.create(
user_id=ID.unique(),
email=payload.email,
password=payload.password,
name=payload.name
)
res= account.create_verification(
url="http://127.0.0.1:8000"
)
return {"message": "User created and verification email sent"}
except Exception as e:
print("Error creating user:", e)
return JSONResponse(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
content={"error": str(e)}
)
Summary
Developers are receiving an error while trying to send email verification from the server. The error message indicates that an IP address is not accepted and domain names like abcd.com need to be added. Additionally, there is an error related to missing scope (account) when registering a new user despite having all scopes activated and enabled. The provided code for user creation and email verification is triggering the errors.