//native
type Telnyx = {
apiKey: string
}
/**
* Get bulk SIM card action details
* This API fetches information about a bulk SIM card action. A bulk SIM card action contains details about a collection of individual SIM card actions.
*/
export async function main(auth: Telnyx, id: string) {
const url = new URL(`https://api.telnyx.com/v2/bulk_sim_card_actions/${id}`)
const response = await fetch(url, {
method: 'GET',
headers: {
Authorization: 'Bearer ' + auth.apiKey
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
Submitted by hugo697 428 days ago