//native
type Zoho = {
token: string;
baseUrl: string;
};
/**
* Get Applications
* This API fetches the meta information of all the applications that you have access to.
*/
export async function main(auth: Zoho) {
const url = new URL(`${auth.baseUrl}/creator/v2.1/meta/applications`);
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: "Zoho-oauthtoken " + auth.token,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 235 days ago