OpenTouch RestApi: 403 Foridden AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER

Download the API here: http://api.aapp.al-enterprise.com
Post Reply
michael_2017
Member
Posts: 3
Joined: 18 Sep 2017 05:06

OpenTouch RestApi: 403 Foridden AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER

Post by michael_2017 » 18 Sep 2017 05:30

Hallo,

i had OpenTouch(OpenTouch Multimedia Services 2.2) server. After login over /api/rest/authenticate?version=1.0 get an cooky with session key.

The problem if call than /api/rest/1.0/sessions or an other url from rest api became an http status 403.

If i want to read the session infomation from server get http status 403 and message:

{"httpStatus":"FORBIDDEN","code":1001,"helpMessage":"No valid session found for the given identifier. Please logout and login with correct credentials.","type":"INVALID_SESSION","innerMessage":"AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER No framework session in API with this ID : 16.....313","canRetry":true}

is this an problem from server config or problem from my request?

User avatar
frank
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 12675
Joined: 06 Jul 2004 00:18
Location: New York
Contact:

Re: OpenTouch RestApi: 403 Foridden AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER

Post by frank » 18 Sep 2017 17:16

Need debug. What cookie do you get, what id do you send to the URL ? Your request is probably not setup correctly.
Code Free Or Die

michael_2017
Member
Posts: 3
Joined: 18 Sep 2017 05:06

Re: OpenTouch RestApi: 403 Foridden AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER

Post by michael_2017 » 19 Sep 2017 08:55

Hi,
i had 2 cookies
AlCuserId for path /
JSESSIONID for path /api/

my request after login over /api/rest/authenticate?version=1.0
apiRequest.png
You do not have the required permissions to view the files attached to this post.

User avatar
frank
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 12675
Joined: 06 Jul 2004 00:18
Location: New York
Contact:

Re: OpenTouch RestApi: 403 Foridden AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER

Post by frank » 20 Sep 2017 16:14

Is the session timer expired maybe ?
What is it setup at ?
Code Free Or Die

User avatar
frank
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 12675
Joined: 06 Jul 2004 00:18
Location: New York
Contact:

Re: OpenTouch RestApi: 403 Foridden AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER

Post by frank » 20 Sep 2017 16:16

Did you also try the REST API CLIENT ?
Code Free Or Die

michael_2017
Member
Posts: 3
Joined: 18 Sep 2017 05:06

Re: OpenTouch RestApi: 403 Foridden AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER

Post by michael_2017 » 21 Sep 2017 02:52

if i use rest Api client from acatel i get an error with number 253.

08:47:09.997 [JavaFX Application Thread] DEBUG a.r.t.ws.gui.AuthenticateController - Issue : 253
javax.ws.rs.ProcessingException: 253
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:234)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:655)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:652)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:423)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:652)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:387)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:291)
at alcatel_lucent.rest.tools.ws.authent.Authentication.authenticate(Authentication.java:86)
at alcatel_lucent.rest.tools.ws.gui.AuthenticateController.actionLaunch(AuthenticateController.java:205)
at alcatel_lucent.rest.tools.ws.gui.AuthenticateController.authenticate(AuthenticateController.java:108)
......

on server is kerberos authenticate activate.

User avatar
frank
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 12675
Joined: 06 Jul 2004 00:18
Location: New York
Contact:

Re: OpenTouch RestApi: 403 Foridden AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER

Post by frank » 21 Sep 2017 09:41

I'm sorry I do not have an open touch here. I guess open a ticket with ALE ... and let us know ..
Just curious - Have you tried with a POST instead of a GET ?
Code Free Or Die

PeterPinnau
Member
Posts: 1
Joined: 09 Apr 2018 05:59

Re: OpenTouch RestApi: 403 Foridden AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER

Post by PeterPinnau » 09 Apr 2018 06:11

michael_2017 wrote:
18 Sep 2017 05:30
If i want to read the session infomation from server get http status 403 and message:

{"httpStatus":"FORBIDDEN","code":1001,"helpMessage":"No valid session found for the given identifier. Please logout and login with correct credentials.","type":"INVALID_SESSION","innerMessage":"AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER No framework session in API with this ID : 16.....313","canRetry":true}
I received the same problem and finally found my mistake. Maybe someone is interested.

After you authenticated via basic auth and got the AclUserId token you MUST open a session. Therefor a HTTP POST to /api/rest/1.0/sessions must be send. An identifier for your application has to be passed in the POST data as JSON:

{
"applicationName": "MyApplication"
}


The respone gives you a list of features available:
{
"admin": false,
"timeToLive": 1800,
"publicBaseUrl": "https://otms.yourdomain.local:443/api/rest/1.0",
"privateBaseUrl": "https://otms.yourdomain.local:443/api/rest/1.0",
"services": [
{
"serviceName": "Logins",
"serviceVersion": "1.0",
"relativeUrl": "/logins"
},
{
"serviceName": "Users",
"serviceVersion": "1.0",
"relativeUrl": "/users"
},
{
"serviceName": "BasicTelephony",
"serviceVersion": "1.0",
"relativeUrl": "/telephony/basicCall"
},
{
"serviceName": "Storage",
"serviceVersion": "1.0",
"relativeUrl": "/storage"
},
{
"serviceName": "Performance",
"serviceVersion": "1.0",
"relativeUrl": "Performance"
},
{
"serviceName": "Privacy",
"serviceVersion": "1.0",
"relativeUrl": "/privacy"
},
{
"serviceName": "SystemInfo",
"serviceVersion": "1.0",
"relativeUrl": "/systems"
},
{
"serviceName": "Message",
"serviceVersion": "1.0",
"relativeUrl": "/messages"
}
],
"capabilities": [
"BASIC_TELEPHONY"
]
}

Note that you MUST send the POST request to open the session immediatly after the basic auth. If you do any other request like "GET /sessions" you will receive AlcChameleonException.BAD_FRAMEWORK_SESSION_IDENTIFIER.

You can use "Postman" to connect to the service a play around with it. Postman is a very useful tool when working with REST services. You must use the recent version from https://www.getpostman.com since former versions do not support cookies.

If my current project has some time left I probably will make a short video howto connect to the Alcatel REST service via Postman and dial a number.

Post Reply

Return to “Web Services”