Traccar SMS gateway not working lately, Error: messaging/registration-token-not-registered, Requested entity was not found.

Salman5 months ago

here is the google apps script code which was working fine but since i changed the device i am getting followng error:

function sendTraccarSms(phone, message) {
  var url = 'https://www.traccar.org/sms/';
  var token = 'YOUR_TOKEN';  // Replace with your actual token

  var payload = {
    "to": phone,
    "message": message
  };

  var options = {
    'method': 'post',
    'contentType': 'application/json',
    'headers': {
      'Authorization': 'Bearer ' + token
    },
    'payload': JSON.stringify(payload)
  };

  try {
    var response = UrlFetchApp.fetch(url, options);
    Logger.log(response.getContentText());
  } catch (e) {
    Logger.log('Error: ' + e.message);
  }
}

// Example usage
function testSendTraccarSms() {
  var phone = '1234567890';  // Replace with the target phone number
  var message = 'Hello, this is a test SMS from Traccar via Google Apps Script!';
  sendTraccarSms(phone, message);
}
Anton Tananaev5 months ago

How is this related to Traccar Client?

Salman5 months ago

Sorry i forgot to share the log:

{"responses":[{"success":false,"error":{"code":"messaging/registration-token-not-registered","message":"Requested entity was not found."}}],"successCount":0,"failureCount":1}

I cannot seem to identify the issue on my side.

Car Owl5 months ago

any update on this?

Salman5 months ago

Still no access and No reply from the developer. However, I have found an alternate solution to sending sms via http call using my own android and sim:

https://sms.capcom.me/

It an open source service therefore it's free to use and it turns my mobile into sms gateway.

georgea month ago

Mr Salman the setup of capcom service is the same as traccar sms gateway?