Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Walmart CA Api is not working. #5

Open
loveisbluenova opened this issue Jul 15, 2023 · 6 comments
Open

Walmart CA Api is not working. #5

loveisbluenova opened this issue Jul 15, 2023 · 6 comments

Comments

@loveisbluenova
Copy link

I tried get all orders with Walmart Canada API, but authorized is failed.
Exception when calling OrdersApi->getAllOrders: [401] {"error":[{"code":"UNAUTHORIZED.GMP_GATEWAY_API","field":"UNAUTHORIZED","description":"Unauthorized","info":"Unauthorized token or incorrect authorization header. Please verify correct format: \"Authorization: Basic Base64Encode(clientId:clientSecret)\" For more information, see https://developer.walmart.com/#/apicenter/marketPlace/latest#apiAuthentication.","severity":"ERROR","category":"DATA","causes":[],"errorIdentifiers":{}}]}
I think consumerId and privateKey is not working for authorization.
Also I'm not sure how to use "WM_CONSUMER.CHANNEL.TYPE" in API header.

@jlevers
Copy link
Contributor

jlevers commented Jul 22, 2023

That auth error is kind of strange, since as you mentioned in #3, the CA marketplace doesn't support client ID/client secret. Since I don't have any CA credentials, this is pretty hard for me to debug, but if you want to share yours with me to speed up the process, my email is [first name] [at] highsidelabs.co.

I see from the docs that the WM_CONSUMER.CHANNEL.TYPE header is required in CA – it's not the US, so I didn't build it into the library. I'll find a way to make the requirement for it country-specific.

@jlevers
Copy link
Contributor

jlevers commented Jul 24, 2023

You can now pass a channelType key/value pair to the Configuration constructor, in v0.4.1. Give that a shot and let me know if it solves your issue.

@quocvu88
Copy link

quocvu88 commented Aug 4, 2023

I have the same issue. I already put channelType, consumerID and private key but alway return an exception with "Exception when calling ItemsApi->getAllItems: [0] [NULL response]" mesage.
Can you please help me to check! Thank you!

@jlevers
Copy link
Contributor

jlevers commented Aug 5, 2023

@quocvu88 just to confirm, you're also doing this in the CA marketplace? Since I don't have CA credentials, this is difficult for me to test, but if you're willing to let me use yours to test I'm happy to try and figure out what's going on here. Feel free to shoot me an email at [first name] [at] highsidelabs.co.

@quocvu88
Copy link

quocvu88 commented Aug 6, 2023

Hi @jlevers,
Yes, I am doing this in CA marketplace. I sent you an email with my credential.
Thank you!

@jlevers
Copy link
Contributor

jlevers commented Aug 18, 2023

Thanks for the creds @quocvu88, those have been very helpful.

The latest release solves part of the issue here – signature-based authentication is working properly now – but Walmart's models are quite bad, especially for XML responses, so the CA getAllOrders call still isn't deserializing properly. I'll continue to work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants