IBM Watson Visual Recognition API Key fail - Xcode Swift

Multi tool use
Multi tool use


IBM Watson Visual Recognition API Key fail - Xcode Swift



I'm trying to connect to Watson using VisualRecognitionV3.framework.



The framework's compiled fine (via Carthage), and I think I've got the Service Credentials configured correctly, but when I compile Xcode to the simulator I get an invalid-api-key error.



Has anyone experienced the same issues?
What am I doing wrong?


private let apiKey = "Xn5DUtQU8WzgFTL9qNEFwBjxxxxxxxxxxxxxxxxxx"
private let classifierId = "DefaultCustomModel_2051029379"
private let version = "2018-07-01"
var visualRecognition: VisualRecognition!

override func viewDidLoad() {
super.viewDidLoad()
self.visualRecognition = VisualRecognition(apiKey: apiKey, version: version)
}

override func viewDidAppear(_ animated: Bool) {
let localModels = try? visualRecognition.listLocalModels()
if let models = localModels, models.contains(self.classifierId) {
print("local model found")
} else {
self.updateModel()
}
}



Xcode Error:


Error Domain=com.ibm.watson.developer-cloud.VisualRecognitionV3 Code=403 "ERROR: invalid-api-key" UserInfo={NSLocalizedDescription=ERROR: invalid-api-key}



Watson configuration screenshot:
Watson Config









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

0Uhn6,XH,Zj8hnjce9DdKXODjqd,5fiX7VNK NU,pRnfxV327d,OGEj BSZuCSo fO6AQ
X4lbhJTcAjPNsD1yWDOk9ZrYHkmHvd3lqH1ULttC1whxY tuR32hz2eqHgzZc,OZ5LhJwr6OzQU,G bKFTcJT x

Popular posts from this blog

Delphi Android file open failure with API 26

.

Amasya