Home > Enterprise >  How to send the BreezeSession's value with each of requests to Adobe Connect's Web Service
How to send the BreezeSession's value with each of requests to Adobe Connect's Web Service

Time:02-19

I have read the Adobe Connect's document, I could not understand that where should I place my BreezeSession's value (especially in Postman) when I want to call other actions which need authentication and BreezSession's value to work.

Step 1: User can login with his username and password with this GET action:

$"{AdobeConnectServerURL}/api/xml?action=login"  
            $"&login={login.Username}"  
            $"&password={login.Password}";

The code, results BreezeSession's value in its header. So my authentication and login works perfectly.

Now imagine I want to call another Adobe Connect's action which creates a new meeting, I have to create the meeting with an authorized user's BreezeSession.

How can I send the BreezeSession's value among create-user's action to Adobe Connect Server ?

CodePudding user response:

I found the answer I hope that it will be helpful for others.

Inside the URL you can use the segment named session:

YourURLHere/api/xml?session=YourBreezeSession&action=YourActionHere

or you can set cookie using this function inside your code for calling APIs.

public async Task<string> CallApi(string apiUrl)
    {
        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(apiUrl);
        var cc = new CookieContainer();
        cc.Add(new Cookie("BREEZESESSION", "Your BreezeSession Value Here", "/", "your URL"));
        request.CookieContainer = cc;
        var response = await request.GetResponseAsync();
        var x = new StreamReader(response.GetResponseStream()).ReadToEnd();
        return x;

    }
  • Related