I am trying to register users auth and database client side Android JAVA-SDK, setKey(****) throws an error
TypeScript
// Initialize the Appwrite SDK
Client client = new Client();
client.setEndpoint("https://[ENDPOINT]/v1").setProject("[PROJECT_ID]").setKey("[API_KEY]");
error message Cannot resolve method 'setKey' in 'Client'
TL;DR
The user is getting an error message stating that there is no `setKey` method in the `Client` class. Another user points out that in Java, setting a key is only necessary for server-to-server communication, not client-side apps. The solution is to remove the `setKey` method from the code.Hi ๐
In Java, you dont need to set key if this is a client side app. setKey is needed only for server to server communication.
ok. THanks.
[SOLVED] Cannot resolve method 'setKey' in 'Client'
Recommended threads
- {"code": 1008, "message": "Invalid Origi...
Nothing has changed in my application or console settings so I'm curious as to what I need to do to fix this. I already have the client registered so I'm not en...
- android platform invaild origina
It happened today suddenly. Our app says invalid origin. And appwrite cloud says every time we tried to add the app to it: "param platformId" is not optional.
- All my apps are not opening now
All my apps are not opening now 200+ apps are not opening plz fast