22 lines
495 B
JavaScript
22 lines
495 B
JavaScript
/* global axios */
|
|
import ApiClient from '../ApiClient';
|
|
|
|
class WhatsappChannel extends ApiClient {
|
|
constructor() {
|
|
super('whatsapp', { accountScoped: true });
|
|
}
|
|
|
|
createEmbeddedSignup(params) {
|
|
return axios.post(`${this.baseUrl()}/whatsapp/authorization`, params);
|
|
}
|
|
|
|
reauthorizeWhatsApp({ inboxId, ...params }) {
|
|
return axios.post(`${this.baseUrl()}/whatsapp/authorization`, {
|
|
...params,
|
|
inbox_id: inboxId,
|
|
});
|
|
}
|
|
}
|
|
|
|
export default new WhatsappChannel();
|