Any way to auto send sms using ionic

Is there any way to send am automatic sms using firebase cloud functions or something similiar.

Send SMS how - from an API or from the device?

I want to be able to send an automatic sms when phone accelerometer meets a certain threshold.

Yes, but I am asking how you want to send the SMS. With the device the app is running on or via an API that can send a SMS by calling it? Does the sender have to be the number of the device? Can you pay for the SMS or does the user have to pay for them by using the SMS of the device?

So whichever would be easier but preferably user pays for sms but it doesn’t really matter. What would you advise.