nice-hms-integration
Version:
This is a project for the Nice-HMS software integrators to upgrade their non-ABDM software into ABDM-compliant software.
23 lines (19 loc) • 445 B
text/typescript
import axios from "axios";
export interface AUTH_TOKEN {
token: string;
}
export const authToken = async (
clientId: string,
clientSecrete: string,
baseUrl: string
): Promise<AUTH_TOKEN> => {
const url = `${baseUrl}auth_token`;
const res = await axios
.post(url, {
email: clientId,
password: clientSecrete,
returnSecureToken: true,
})
.then((res) => res.data);
return res;
};