I am trying to classify texts using the Google language API with the provided Java client. The code is in Scala and looks like this:
val language = LanguageServiceClient.create()
val doc = Document.newBuilder.setGcsContentUri(draftBody).setType(Type.PLAIN_TEXT).build
val request = ClassifyTextRequest.newBuilder.setDocument(doc).build
val response = language.classifyText(request)
The client will not log in, is there a way to log in using the API key I created?
source
share