fix(twilio/receive-sms): use phone number via phone number sid
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { IGlobalVariable } from "@automatisch/types";
|
||||
|
||||
type Response = {
|
||||
sid: string;
|
||||
phone_number: string;
|
||||
};
|
||||
|
||||
export default async function getIncomingPhoneNumber($: IGlobalVariable) {
|
||||
const phoneNumberSid = $.step.parameters.phoneNumberSid as string;
|
||||
const path = `/2010-04-01/Accounts/${$.auth.data.accountSid}/IncomingPhoneNumbers/${phoneNumberSid}.json`;
|
||||
const response = await $.http.get<Response>(path);
|
||||
|
||||
return response.data;
|
||||
};
|
Reference in New Issue
Block a user