SirDeveloper
SirDeveloper

Reputation: 276

Linkedin SDK with iOS - authentication failed

I'm trying to authenticate an user with Linkedin SDK, I've followed guide here (official).

So, in my info.plist I have inserted my personal AppId, as explained.

Then I edited app settings at https://www.linkedin.com/developer/apps//mobile inserting:

So, I link an UIButton action to this part of code:

LISDKSessionManager.createSessionWithAuth(self.permissions, state: nil, showGoToAppStoreDialog: true, successBlock: { (state: String!) -> Void in
    print("Login \(state)"
 }, errorBlock: { (error: NSError!) -> Void in
    print("Login error: \(error)")
})

On click, Linkedin app it will open and after authentication it automatically turn back to application, throwing error:

Login error: Error Domain=LISDKAuthError Code=5 "(null)" UserInfo={errorDescription=the request scope is invalid, unknown, malformed, originalDomain=LISDKServerError, errorInfo=invalid_scope}

What I'm missing?

I tried example app that are inside SDK and works, but I can't figure out the differences..

Are differences inside app settings? (at www.linkedin.com/developer/apps/)

Upvotes: 2

Views: 1184

Answers (2)

Tejinder
Tejinder

Reputation: 1557

Please check if you have used right linkedin Application ID in your app info.plist file, also if you have added your app identifier in your linkedin app. For detail check link: https://stackoverflow.com/a/37960838/3467325

Upvotes: 0

Mandeep Kumar
Mandeep Kumar

Reputation: 776

Make sure you are requesting the basic information from the linkdin as the new Linkdin apis only provide the basic information

Upvotes: 6

Related Questions