Problems with API in Java

213 views
Skip to first unread message

Eric MacAdie

unread,
Jul 21, 2011, 2:46:57 PM7/21/11
to shopify-api
I am trying to build a Shopify app with the API, and I am trying to
make some calls via Java with the Apache HTTPClient library. There is
an app that was created for me at https://$TEST_SHOP_NAME.myshopify.com/admin/api.
It has an Api Key, a Password and a Shared Secret.

When I make an API call with the same URL via the command-line with
curl or wget I can get results, although I have to set some options to
turn off HTTPS (curl -k or wget --no-check-certificate). I get nothing
when I try to get this to work in Java, both with http and https.

Do I need to add some header to get it to work in Java? I have not
tried to go through the steps in http://api.shopify.com/authentication.html
(creating a new app, parsing the response, etc). I was under the
impression that I could just try some calls with the info from the
test app.

Yevgeniy Viktorov

unread,
Jul 21, 2011, 7:05:23 PM7/21/11
to shopi...@googlegroups.com
Hello,

here is something java+shopify related I bookmarked in the past, but never tried:
https://gitorious.org/jhopify/jhopify
https://github.com/shopster/connectSter/tree/master/source/connectster/adapter/shopify

Hope you'll find something useful there ;)

Thanks.

Eric MacAdie

unread,
Jul 26, 2011, 5:39:26 PM7/26/11
to shopi...@googlegroups.com
Thanks, I will look into these.

I got things working WRT making some GET requests.

I am now trying out the steps on
http://api.shopify.com/authentication.xml.html in Java to get the
signature from the request parameters. I am not getting the same
answer that I see in the example. Does anyone have an example of doing
this in Java that I could look at?

Eric MacAdie

unread,
Jul 26, 2011, 6:12:19 PM7/26/11
to shopify-api
I got it to work. It turns out I was combining the strings in the
wrong order.

On Jul 26, 4:39 pm, Eric MacAdie <emaca...@gmail.com> wrote:
> Thanks, I will look into these.
>
> I got things working WRT making some GET requests.
>
> I am now trying out the steps onhttp://api.shopify.com/authentication.xml.htmlin Java to get the
> signature from the request parameters. I am not getting the same
> answer that I see in the example. Does anyone have an example of doing
> this in Java that I could look at?
>
>
>
>
>
>
>
> On Thu, Jul 21, 2011 at 6:05 PM, Yevgeniy Viktorov <yeev...@gmail.com> wrote:
> > Hello,
>
> > here is something java+shopify related I bookmarked in the past, but never
> > tried:
> >https://gitorious.org/jhopify/jhopify
> >https://github.com/shopster/connectSter/tree/master/source/connectste...
>
> > Hope you'll find something useful there ;)
>
> > Thanks.
>
Reply all
Reply to author
Forward
0 new messages