//native
type Zixflow = {
apiKey: string
}
export async function main(resource: Zixflow, memberId: string) {
const endpoint = `https://api.zixflow.com/api/v1/workspace-members/${memberId}`
const response = await fetch(endpoint, {
method: 'GET',
headers: {
Authorization: `Bearer ${resource.apiKey}`
}
})
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`)
}
const data = await response.json()
return data
}
Submitted by hugo697 606 days ago