Unable to initialize Mobile SDK | Community
Skip to main content

Unable to initialize Mobile SDK

  • July 13, 2022
  • 4 replies
  • 0 views

Login error: Error Domain=com.zendesk.sdk.core Code=1000 "unauthorized" UserInfo={error=Couldn't authenticate you, NSLocalizedDescription=unauthorized, HTTP Status code=401}

Getting this error however I have initialized Zendesk SDK with client secret, Zendesk url & app id.

I have also created JWT url and validated the URL. I am setting identity to Identity.createJwt(token: "user_id")

4 replies

Eric27
  • July 13, 2022
Hey Bunty, 

Do you mind providing us code snippets of how you're initializing the sdk and handling auth for the user? 

Thanks!

  • Author
  • July 14, 2022

Zendesk.initialize(

            appId: "app_id",

            clientId: "mobile_sdk_client",

            zendeskUrl: "url"

        )

Support.initialize(withZendesk: Zendesk.instance)

 

let identity = Identity.createJwt(token: "user_id")

Zendesk.instance?.setIdentity(identity)

let requestScreen = RequestUi.buildRequestList()

self.navigationController?.pushViewController(requestScreen, animated: true)


  • Author
  • July 14, 2022

This was JWT server error, it is resolved by our server team, Thanks.


Eric27
  • July 15, 2022
Hey Bunty,

Glad to hear that you got this sorted, let us know if there is anything we can help with.