Hi,
I am trying to call Genesys API in our private embedded framework integration. Below you can find my code in Angular. I was able to retrieve the token at run-time and pass it to getSystemPresences. However, I was not able to return the data. The origin in OAuth setting is defined.
private getSystemPresences(token) {
try {
const url = 'https://api.mypurecloud.com/api/v2/systempresences';
const header = {
headers: new HttpHeaders().set('Authorization', `Bearer ${token}`).set('Content-Type', 'application/json')
};
this.http.get(url, header).subscribe((data: any) => {
return data;
});
} catch (error) {
console.warn(JSON.stringify(error));
}
}
#Integrations------------------------------
Seyed Ahmad Mansouri
AMC Technology LLC
------------------------------