Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic Aurora

 AfterLogic Forum : AfterLogic Aurora
Subject Topic: API does not work Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
solkmaaker
Senior Member
Senior Member


Joined: 28 June 2020
Online Status: Offline
Posts: 153
Posted: 23 October 2021 at 5:20am | IP Logged Quote solkmaaker

v9.1.1

API does not work for superadmin as described in https://afterlogic.com/aurora-corporate-8-webapi/#api-Core-Login

Output is:
Code:
{"AuthenticatedUserId":0,"@Time":0.0342,"SubscriptionsResult":null,"@TimeApiInit":0.0103,"@LoggerGuid":"249ceac5","ErrorCode":102,"Module":""}


How to use API as superadmin in v9?
Back to Top View solkmaaker's Profile Search for other posts by solkmaaker
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 24 October 2021 at 11:43pm | IP Logged Quote Igor

In v9, you need to use LoginAsSuperadmin method of AdminAuth module.

If you set AllowLoginFromCoreModule to true in data/settings/modules/AdminAuth.config.json configuration file, you'll be able to use old version's API and adminpanel - those are deprecated, though.

We plan on upgrading API documentation in the nearest future. Thank you.

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Antonyous
Newbie
Newbie


Joined: 03 June 2022
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 03 June 2022 at 9:37am | IP Logged Quote Antonyous

Have the same answer from API.
Use Lite version 8. Just dawnload and installed as it is.
What I need more for the API working normally?
Back to Top View Antonyous's Profile Search for other posts by Antonyous
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 03 June 2022 at 10:23am | IP Logged Quote Igor

Are you sure it's version 8 of WebMail Lite? You can check the version as shown at:

https://afterlogic.com/docs/webmail-lite/troubleshooting/detecting-version-used

Also, which method exactly are you using? Can you provide the code sample?

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Antonyous
Newbie
Newbie


Joined: 03 June 2022
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 03 June 2022 at 2:44pm | IP Logged Quote Antonyous

I see <!-- 9.4.0.build4-build-a3 -->
postman_collection.json was loaded.
Try as example post this:
wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header '' \
--body-data 'Module=StandardLoginFormWebclient&Method=Login&Parameters={"Login": "superadmin","Password": "12345678"}' \
   'https://domen.com/mail/index.php/?/Api/='
Get response:
{
    "AuthenticatedUserId": 0,
    "@Time": 0.0187,
    "SubscriptionsResult": null,
    "@TimeApiInit": 0.0118,
    "ErrorCode": 102,
    "Module": ""
}
Back to Top View Antonyous's Profile Search for other posts by Antonyous
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 05 June 2022 at 11:36pm | IP Logged Quote Igor

Since it's version 9, my first response in this thread applies in full:

Quote:
In v9, you need to use LoginAsSuperadmin method of AdminAuth module.

If you set AllowLoginFromCoreModule to true in data/settings/modules/AdminAuth.config.json configuration file, you'll be able to use old version's API and adminpanel - those are deprecated, though.


--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Antonyous
Newbie
Newbie


Joined: 03 June 2022
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 06 June 2022 at 2:05am | IP Logged Quote Antonyous

Why wasn't it set to true right away? Wouldn't I have run into this problem then?
'those are deprecated, though'
Where is the new version of the API?
Back to Top View Antonyous's Profile Search for other posts by Antonyous
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 06 June 2022 at 2:09am | IP Logged Quote Igor

In version 9, old adminpanel is disabled. You can enable it, yes, but only the new adminpanel will receive updates when new features are added.

We'll update the documentation when time permits. Thanks.

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 06 June 2022 at 2:12am | IP Logged Quote Igor

By the way, the authentication issue is covered at:

https://afterlogic.com/docs/webmail-lite/developers-guide/using-web-api

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide