import fs from 'fs';
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.whatsapp.phoneNumbers.profile.photo.upload('phone_number', {
file: fs.createReadStream('path/to/file'),
});
console.log(response.data);
import fs from 'fs';
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.whatsapp.phoneNumbers.profile.photo.upload('phone_number', {
file: fs.createReadStream('path/to/file'),
});
console.log(response.data);