Hi, I am trying to use the java client (0.4.0) to ...
# spicedb
Hi, I am trying to use the java client (0.4.0) to connect to a local instance of spicedb in docker. I am getting "unauthenticated" back from the server. Is the bearer token supposed to be the grpc preshared key set as an env var? Or am i missing something else (attached error and code)
Copy code
io.grpc.StatusRuntimeException: UNAUTHENTICATED
    at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271)
    at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:252)
    at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:165)
    at com.authzed.api.v1.SchemaServiceGrpc$SchemaServiceBlockingStub.writeSchema(SchemaServiceGrpc.java:255)
Copy code
        ManagedChannel channel = ManagedChannelBuilder

        BearerToken bearerToken = new BearerToken("foobar");
        SchemaServiceGrpc.SchemaServiceBlockingStub schemaService = SchemaServiceGrpc.newBlockingStub(channel)

        String schema = """
                definition blog/user {}
                definition blog/post {
                    relation reader: blog/user
                    relation writer: blog/user
                    permission read = reader + writer
                    permission write = writer

        WriteSchemaRequest request = WriteSchemaRequest.newBuilder()

        WriteSchemaResponse response;
        try {
            response = schemaService.writeSchema(request);
        } catch (Exception e) {

any help is much appreciated 🙂