Back

createPhoneToken

  • 0
  • Auth
  • Web
RP
3 Sep, 2024, 12:38

Hi, I am getting 500 server error on calling createPhoneToken(D.unique(), phone_number) This was working fine since few days and today it is not working from the past 6 hours or so. Here is the complete execution error log

Error generating OTP for +91XXXXXXXXXX: app.XXXXXXXXXXXXXXX0@service.cloud.appwrite.io (role: applications) missing scope (sessions.write) Error: app.XXXXXXXXXXXXXXX0@service.cloud.appwrite.io (role: applications) missing scope (sessions.write) at Client.call (/usr/local/server/src/function/node_modules/node-appwrite/lib/client.js:206:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Account.createPhoneToken (/usr/local/server/src/function/node_modules/node-appwrite/lib/services/account.js:1219:16) at async generateOTP (file:///usr/local/server/src/function/src/main.js:14:21) at async Module.default (file:///usr/local/server/src/function/src/main.js:68:22) at async execute (/usr/local/server/src/server.js:208:16) at async action (/usr/local/server/src/server.js:225:7) at async /usr/local/server/src/server.js:14:5

TypeError: res.status is not a function at Module.default (file:///usr/local/server/src/function/src/main.js:73:20) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async execute (/usr/local/server/src/server.js:208:16) at async action (/usr/local/server/src/server.js:225:7) at async /usr/local/server/src/server.js:14:5

#🚑│support

TL;DR
Developers are facing a 500 server error when calling createPhoneToken, with a missing sessions.write scope error. The issue has been occurring for the past 6 hours. The error log shows a TypeError with res.status. Solution: To resolve the issue, the role "applications" needs to be granted the "sessions.write" scope.
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