Log in or register to post comments

Authentication issue with Cloud Recognition web service API

January 24, 2020 - 3:24pm #1

Hi all,

I got the Java web service examples working with my cloud database, then added a new sample based on the existing ones to issue recognition queries to the web services API. I'm pretty sure I've understood the directions here:

https://library.vuforia.com/articles/Solution/How-To-Perform-an-Image-Recognition-Query

but my queries are failing with a 401. I've tried this both with hand-assembled curl commands and with my Java classes with the same result.

There's some ambiguity about whether to use the server or client key pairs so I tried both. I've also tried omitting the multi-part boundary from the content type in my signature generation, but always with the same result.

I'm hoping someone who has gotten this working can look at my Java classes and tell me where I've gone wrong, or provide a reference to a working example.

Thanks so much!

 

AttachmentSize
Package icon java.zip3.3 KB

Authentication issue with Cloud Recognition web service API

February 3, 2020 - 1:33am #4

Hi,

Ok, thank you for clarifying. 

At this point in time we don't have samples that show how to query for Java, however we have them for python. Available under the same link.

Hope this provides some information on how to.

In addition I will raise the issue of "missing" query samples for Java with Product Management in order to be updated.

Thank you.

Vuforia Engine Support

Authentication issue with Cloud Recognition web service API

January 31, 2020 - 10:48am #3

Hi there, thanks for your reply.

What I'm trying to do with my sample is not upload a new target, but to run a recognition query against the targets I've already defined. There's no sample for that in the download, so I made a new one based on the existing PostNewTarget sample - that's what's in the Java code I provided. It's not working though, and I suspect there's something different between the API for upload vs. query that I'm not understanding.

Is there an example somewhere for running a recognition query?

Thanks again,

Patrick

 

Authentication issue with Cloud Recognition web service API

January 31, 2020 - 1:10am #2

Hi,

Based on your use-case, you wanting to upload a target to the db, you would need to use the Server credentials

Under https://developer.vuforia.com/downloads/samples -> Vuforia Web Services we have code samples for Java/PHP/Python on how to do certain things, including posting a new target.

I reviewed your code and there are some differences in how our code sample are set up and your code. My advice is to use the PostNewTarget.java as reference for your testing.

Thank you.

Vuforia Engine Support

Log in or register to post comments