Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2017-05-08 16:40:53

Electric Putty
Member
Registered: 2017-05-08
Posts: 9

core.LoginWithKey returning Boolean False

Hello,

I am one of the developers for BrandStencil, we have developed an integration with ThirdLight based on your WordPress Plugin.

We are configuring a new client's account to use this and have created a new API key from within their ThirdLight account.

When we try and execute the LoginWithKey API method via the IMSApiClient using their details we are getting a boolean false response. This method works fine when we use our own test ThirdLight account credentials.

As far as I can tell the two accounts are set up identically. Can you think of any reason why this method would fail in this way? From our tests I can see that if the API key is incorrect the API returns a 'API_KEY_INVALID' message, so I know this isn't the problem.

Many thanks,
Malcolm

Offline

#2 2017-05-09 09:38:57

ben
Third Light Staff
From: Third Light
Registered: 2013-06-06
Posts: 79

Re: core.LoginWithKey returning Boolean False

Hi Malcom,

That is a bit strange. Do you mean it is an otherwise normal response and you get a false in the 'outParams', or that the only thing that is returned is "false"?

Either way, please could you post the exact request and response you're sending and receiving - but please hide the apikey (and client details if you wish).

Many thanks
Ben

Offline

#3 2017-05-09 10:02:03

Electric Putty
Member
Registered: 2017-05-08
Posts: 9

Re: core.LoginWithKey returning Boolean False

Thanks, Ben,

The only thing returned in a boolean false, no outParams

The request looks like this:

array
  'apiVersion' => string '1.0.1' (length=5)
  'action' => string 'core.LoginWithKey' (length=17)
  'inParams' =>
    array
      'apikey' => string '********************************' (length=32)

If I var_dump the response it is simply:

boolean false

I am using your the IMSApiClient packaged with your WordPress plugin. This is working perfectly on a different account - I can switch the site and apikey values via a config and connect immediately.

If I can contact you privately I can give you more details about the accounts.

Many thanks,
Malcolm

Offline

#4 2017-05-09 17:44:08

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 119

Re: core.LoginWithKey returning Boolean False

Hi Malcolm,

I can't see any way for that response to be returned, but I wonder if you are connecting from a system that is unable to negotiate an SSL connection with the server in one case? cURL would return false if it is unable to connect.

Premium/Enterprise sites by default use only TLSv1.2 with ECDHE+SHA2 ciphers, so if your development system has an older SSL library it may not support these.

Notably the trial platform has a more liberal configuration, so you might be able to connect to one but not the other.

Dominic

Offline

#5 2017-05-09 20:11:36

Electric Putty
Member
Registered: 2017-05-08
Posts: 9

Re: core.LoginWithKey returning Boolean False

Many thanks, Dominic.

I deployed our code to our staging env and it worked fine there, so clearly is was an issue with my local environment.

I now have two new issues which I hope are related.

1. The CMS Browser refuses to load in an IFrame - I get a 'Refused to display '....' in a frame because it set X-Frame-Options to sameorigin' message in the console.

2. If I visit the CMS Browser directly and log in I get the message 'Your IMS user account has not been configured for Secure File Fetch, which is required for the Third Light Browser.'

There is a link to some docs describing Enabling the 'Create published files' download permission - If I do this will both issues be resolved?

Many thanks,
Malcolm

Offline

#6 2017-05-10 08:59:23

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 119

Re: core.LoginWithKey returning Boolean False

Hi Malcolm,

1) The X-Frame-Options header is configurable along with the SSL settings, however since it would never be useful for the CMS Browser we've made a change to exclude it from this location.

2) Yes, those docs relate to this error; it is also worth checking the revisions and site settings options referenced on the same page.

Dominic

Offline

#7 2017-05-10 17:06:49

Electric Putty
Member
Registered: 2017-05-08
Posts: 9

Re: core.LoginWithKey returning Boolean False

Thanks, Dominic,

The Iframe issue is resolved now.

I am struggling to follow the instruction regarding user permission outlined in your help docs. I have access to Users and Groups but I can't see where I can update either:

- Users > Users & Groups > Edit User > Downloads
- Users > Users & Groups > Edit User > Editing Rights

Has the interface changed or do I still not have sufficient permissions?

Thanks,
Malcolm

Offline

#8 2017-05-11 10:12:55

ben
Third Light Staff
From: Third Light
Registered: 2013-06-06
Posts: 79

Re: core.LoginWithKey returning Boolean False

Hi Malcolm,

Are you trying to edit a grouped user? If so the settings for Downloads and Editing Rights will be found when editing the relevant Group - obviously this would then impact all members of the group.

Alternatively, are you trying to edit your own user?

Or finally if you don't have any download rights or editing rights yourself, then you won't be able to manage these for other users.

hth
Ben

Offline

Board footer