Back

Android Kotlin SDK ApiKey authentication

  • 0
  • Android
  • Self Hosted
mane
17 May, 2024, 09:41

Hi I need to authenticate using the API key in a kotlin android app. I'm actually using the io.appwrite:sdk-for-android:4.0.0 version (self hosted Version 1.4.3)

I tried adding setKey when creating the client but it won't resolve the reference:

val client = Client(this.applicationContext) .setEndpoint(syncCredentials.cliEndpoint) .setProject(syncCredentials.cliProject) .setKey(syncCredentials.cliApiKey)

What version of SDK should i upgrade to, to be able to use it?

Thanks

TL;DR
- Developer is trying to authenticate using API key in Kotlin Android app using io.appwrite:sdk-for-android:4.0.0 version. - They are attempting to set the key when creating the client, but it's not resolving the reference. - To be able to use setKey method, developer should upgrade to a newer version of the SDK.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more