Twilio Codeless "CheckVerificationCode" Setup

My application Id is: D3AEFCC3-94AD-4944-9AF0-C474EE2AD285.

I’m trying to incorporate OTP mobile verification during account creation via Twilio. The OTP is getting sent out without issue but I get nothing but errors regardless of what I try for Twilio’s codeless block “CheckVerificationCode”. I’ve tried using both the transactionId supplied by Twilio and the user’s mobile number for the transaction Id argument without success. The error I’m getting is:

{“message”:“Transaction is not valid”,“code”:0,“status”:400,“headers”:{“access-control-allow-origin”:“*”,“access-control-allow-methods”:“POST, GET, OPTIONS, PUT, DELETE, PATCH”,“date”:“Mon, 29 Dec 2025 07:04:20 GMT”,“content-type”:“application/json”,“content-length”:“62”},“body”:{“code”:0,“message”:“Transaction is not valid”,“errorData”:{}}}
12:34:21.156 | SERVER_CODE | ERROR | [2049035] TypeError: Cannot read properties of undefined (reading ‘valid’) at getObjectProperty (/opt/backendless/repo/d3aefcc3-94ad-4944-9af0-c474ee2ad285/files/servercode/CODELESS/Auth/PRODUCTION/services/Auth/index.js:407:45) at Auth.VerifyAndRegisterUser (/opt/backendless/repo/d3aefcc3-94ad-4944-9af0-c474ee2ad285/files/servercode/CODELESS/Auth/PRODUCTION/services/Auth/index.js:441:10) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async executor.execute (/usr/local/lib/node_modules/backendless-coderunner/lib/server-code/runners/tasks/executor.js:247:16) at async executeTask (/usr/local/lib/node_modules/backendless-coderunner/lib/server-code/runners/cloud-worker.js:85:22) at async processTask (/usr/local/lib/node_modules/backendless-coderunner/lib/server-code/runners/cloud-worker.js:109:18)
12:34:21.157 | SERVER_CODE | INFO | [2049035] Processing finished in 572.461ms
12:34:21.97 | SERVER_CODE | INFO | [1843555] Building ServerCode Model for path (/opt/backendless/repo/d3aefcc3-94ad-4944-9af0-c474ee2ad285/marketplace/DEPLOYMENT_MODEL/market-B253B45F-B139-A811-FF36-CC35C036DB00)
12:34:21.98 | SERVER_CODE | INFO | [1843555] ServerCode Model built in 8ms
12:34:21.112 | SERVER_CODE | INFO | [1843555] [12D063EE-A156-4F75-9F9C-7059E70C0610] [INVOKE SERVICE] services.Twilio.checkVerificationCode
12:34:21.150 | SERVER_CODE | ERROR | [1843555] Error: Transaction is not valid at Twilio._checkVerificationCode (/opt/backendless/repo/d3aefcc3-94ad-4944-9af0-c474ee2ad285/marketplace/DEPLOYMENT_MODEL/market-B253B45F-B139-A811-FF36-CC35C036DB00/src/service.js:301:13) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async executor.execute (/usr/local/lib/node_modules/backendless-coderunner/lib/server-code/runners/tasks/executor.js:247:16) at async executeTask (/usr/local/lib/node_modules/backendless-coderunner/lib/server-code/runners/cloud-worker.js:85:22) at async processTask (/usr/local/lib/node_modules/backendless-coderunner/lib/server-code/runners/cloud-worker.js:109:18)
12:34:21.150 | SERVER_CODE | INFO | [1843555] Processing finished in 206.697ms
12:34:22.89 | SERVER_CODE | INFO | [2049046] Building ServerCode Model for path (/opt/backendless/repo/d3aefcc3-94ad-4944-9af0-c474ee2ad285/marketplace/DEPLOYMENT_MODEL/market-B253B45F-B139-A811-FF36-CC35C036DB00)
12:34:22.91 | SERVER_CODE | INFO | [2049046] ServerCode Model built in 11ms
12:34:22.96 | SERVER_CODE | INFO | [2049046] [60436bdd-8f9d-4456-87b4-dd9101a0eca8] [INVOKE HANDLER] user.beforeLogin
12:34:22.213 | SERVER_CODE | ERROR | [2049046] Error: Invalid login or password at checkStatus (/usr/local/lib/node_modules/backendless-coderunner/node_modules/backendless-request/lib/request.js:347:9) at process.processTicksAndRejections (node:internal/process/task_queues:105:5)Error at Request.send (/usr/local/lib/node_modules/backendless-coderunner/node_modules/backendless-request/lib/request.js:284:23) at Request.then (/usr/local/lib/node_modules/backendless-coderunner/node_modules/backendless-request/lib/request.js:309:43) at Users._callee2$ (/usr/local/lib/node_modules/backendless-coderunner/node_modules/backendless/lib/users/index.js:112:18) at Users. (/usr/local/lib/node_modules/backendless-coderunner/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:52:18) at Generator. (/usr/local/lib/node_modules/backendless-coderunner/node_modules/@babel/runtime/helpers/regenerator.js:52:51) at Generator.next (/usr/local/lib/node_modules/backendless-coderunner/node_modules/@babel/runtime/helpers/regeneratorDefine.js:11:21) at asyncGeneratorStep (/usr/local/lib/node_modules/backendless-coderunner/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17) at _next (/usr/local/lib/node_modules/backendless-coderunner/node_modules/@babel/runtime/helpers/asyncToGenerator.js:17:9) at /usr/local/lib/node_modules/backendless-coderunner/node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:7 at new Promise ()

Hello Jessica,
Just a quick clarification based on your flow.

In your codeless flow cachedTwilioCode using Convert Object to Text, but then you pass that same cachedTwilioCode into checkVerificationCode as the transactionId. If the cache contains an object (or ends up as null / "[object Object]") instead of the plain transactionId string returned by Twilio, that could explain the “Transaction is not valid” error.

Also, I don’t see the cachedTwilioCode value in the logs you shared (maybe DEBUG isn’t shown). Could you please double-check what is actually stored in cache under finalId, and what value is being sent as transactionId at runtime?

Regards,
Alexander

Thank you for looking into it for me Alexander. I think the issue actually came from downstream as I had put a ‘Convert to Object’ block instead of ‘Convert to Text’. User ‘id:10T’ error :flushed_face:. It’s all working now.

Glad to hear it’s working now! :blush: Thanks for the update — that’s an easy one to miss (Convert to Object vs Convert to Text). If anything else comes up, feel free to reach out.

Regards,
Alexander

1 Like