hocine
hocine

Reputation: 11

invalid-api-key Visual Recognition IBM

I have a school project that is to compare 3 facial recognition APIs (IBM, AMAZON, MICROSOFT).

I want to use the IBM Visual Recognition API, but when I run my java program it always returns the error 403 invalid-api-key.

enter image description here

Upvotes: 1

Views: 191

Answers (1)

Johannes W.
Johannes W.

Reputation: 21

i had the same problem using the java-sdk.

Solved by using the iamCredentials instead of directly using the apikey.

visualRecognition = new VisualRecognition("2018-05-23");
visualRecognition.setIamCredentials(new IamOptions.Builder()
    .apiKey("YOUR_API_KEY")
    .build());

Upvotes: 0

Related Questions