Skip to content

[Q] Is is possible to programmatically register an SMS sender ID #23

@AbdBarho

Description

@AbdBarho

Hello, I am using the following code to send an sms, numbers masked for privacy reasons

const client = sipgateIO({ tokenId, token });

createSMSModule(client).send({
    // this number is assigned to my account from employer:
    from: '+49157XXXXXXXX',

    message: 'Test SMS',
    to: 'some other number',
  })

I am getting the following error

Error: Number is not registered as a sender ID in your account

Why do I have to register the sender ID if the mobile number is already assigned to my account?

I can register the number on the Website if I try to send an sms manually, but is it possible to achieve this programmatically?

Looking at the API specs:
https://api.sipgate.com/v2/doc#/sms
it seems that this should be possible, however, it was unclear to me how to achieve this with sipgate-node library.

The sms module only exports these two functions

export interface SMSModule {
    send: (sms: ShortMessage, sendAt?: Date) => Promise<void>;
    getSmsExtensions: (webuserId: string) => Promise<SmsExtension[]>;
}

Do I have to do requests to the API directly without the client?

I suppose I would need to do a request for verification to the number, get the verification code from the sms of the number, and then do a post to verify?

Thank you.

Related #18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions