Adobe Connect User Community
Menu

#1 2017-02-01 09:56:22

toplap

Can not login through api though login-status is ok

Hello, we manage a wordpress blog and I want the users to get information about courses and meetings on my webpage. So as I understand I need to make an API call with ".../api/xml?action=sco-shortcuts" and parse the response and eventually make some other calls. But first I need to login with my adobe connect account.

So I want to do it via api using php.

First I call following url:

https://domain.com/api/xml?action=common-info&domain=dental-online-college.adobeconnect.com

Than I parse the cookie and call the following url:

https://domain.com/api/xml?action=login&login=myLogin&password=myPassword&domain=dental-online-college.adobeconnect.com&session=The cookie which I got from above".

As a response I got that, the status is ok. So I understand, I have to use the cookie from above always, when I make an api call, as long as I do not log out.

But when I am calling the following url:

https://domain.com/api/xml?action=principal-list&session=The cookie which I got from above"

I got the following response:

<status code="no-access" subcode="no-login"></status>

What am I doing wrong?

Hope u can help me,

Cheers,

Andrej

Offline

#2 2017-02-01 10:10:36

Jorma_at_CoSo

Re: Can not login through api though login-status is ok

For using the APIs, you should be using a login with Admin rights.

Also, you are passing redundant information, as the domain is in the beginning of your call https://domain.com/api... and domain=dental-online-college.adobeconnect.com. You should simplify your calls to just be:

https://dental-online-college.adobeconnect.com/api/xml?action=login&login=myLogin&password=myPassword

https://dental-online-college.adobeconnect.com/api/xml?action=common-info

https://dental-online-college.adobeconnect.com/api/xml?action=principal-list&session=The cookie which I got from above"

You shouldn't need to get your session cookie prior to logging in, unless the Enhanced Security feature was enabled. But even then it will change your session identifier after you log in, so using the one from before you logged in will mean you get the no-access message. Here is the full description, and you can find it by going to Administration > Account > More Settings in Connect Central.

Enable Enhanced Security
- Force Web Services APIs to use secure (HTTPS) connection
- Generate new session identifier after successful login
It is strongly recommended to check Enhanced Security option unless you have integrations that use session identifier before logging in or use unsecured Web Services APIs. Make sure to update such integrations with session identifier after logging in and use secured Web Services APIs so that the integrations keep working after this option is removed in the near future and enhanced security is enabled by default.

Offline

#3 2017-02-01 10:52:31

toplap

Re: Can not login through api though login-status is ok

Thank you for your answer.
I am logging in with the admin account and I am calling the urls below now, but it still does not work. Also I disabled the enhancened security, but it still does not work.

The urls:

https://dental-online-college.adobeconnect.com/api/xml?action=login&login=loginName&password=password

Here is the response I get after:

<status code="ok"></status>

Then I execute following url:

https://dental-online-college.adobeconnect.com/api/xml?action=common-info

After I extract the cookie out of the common-info response and call following url:


https://dental-online-college.adobeconnect.com/api/xml?action=principal-list&session=" + the cookie from above

And get following response:

<status code="no-access" subcode="no-login"></status>

Offline

Board footer