I'm exploring possibilities of creating a Bot for iMessages. I went through the "Messages SDK" provided by Apple for iMessage extensions and didn't find any leads.
Android has Telephony(https://developer.android.com/reference/android/provider/Telephony) which I could use as a starting point. But I couldn't find anything similar on iOS.
If anyone knows how I could achieve this, it would be of great help.
You might want to check out Jared, an open-source iMessage chatbot which reads from the message database. https://github.com/ZekeSnider/Jared
You could check out https://sendblue.co
Here is their documentation: https://docs.sendblue.co
I assume you can send and receive iMessages by simply hitting their endpoint with a post request, like so:
const url = `https://api.sendblue.co/api/send-message` ;
axios.post(url, {
number: '+19998887777',
content: 'Hello world!',
statusCallback: 'https://example.com/message-status/1234abcd',
},
headers: {
"sb-api-key-id": << apiKey >> ,
"sb-api-secret-key": << apiSecret >>
},
}).then(response => {
console.log(response.data);
}).catch(error => {
console.error(error);
});
You can receive iMessages by registering a webhook with them.
Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With