Genesys Cloud - Main

 View Only

Sign Up

Using Genesys API inside Embedded Framework

  Thread closed by the administrator, not accepting new replies.
  • 1.  Using Genesys API inside Embedded Framework

    Posted 11-02-2021 18:39
    No replies, thread closed.
    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
    ------------------------------