Login as created user
  • We created a new user in our application.
    Now we try to login with the credentials using:

    + (id)requestSessionWithUsername:(NSString *)username
                            password:(NSString *)password
                          completion:(void (^)(LQSession *session, NSError *error))block;

    Response is:
    [LQSession requestSessionWithUsername:password:completion:]_block_invoke_0 (LQSession.m:529) Logged in with username and password: {
        error = "unauthorized_client";

    What is the issue? The credentials are right.

    When I try to login using the POST call to "/oauth/token" with client_id and client_secret and username and password I'll get back an access token.
    How can I now list all layers subscribed to the user? I need to create a LQSession I guess? How?

    Thanks for help.
  • 1 Comment sorted by
  • It appears the API key and secret are not being included in the requestSessionWIthUsername:password call. In reviewing the server logs, I saw "null" for the API key in the request. Make sure the first thing you're doing in your application:didFinishLaunchingWithOptions: method is setting the API key like this:

    [LQSession setAPIKey:LQ_APIKey secret:LQ_APISecret];

    You can also use the application debugger to check if the requests are being formatted properly. Go to your application list and click "debug" on the appropriate app. If you don't see a request there when you think there should be one, it's because no API key was included.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion