Walmart OAuth 2.0 authentication

  • Hi, I want to connect to Walmart Marketplace using my own credentials
  • Make.com is not on the list of pre-approved app with delegated access nor can I register it so I can’t generate the auth code
  • Currently, I would call https://marketplace.walmartapis.com/v3/token to receive the access token using client id and client secret
  • The access token is used in the WM_SEC.ACCESS_TOKEN header for other API calls

What I’m using right now:

  1. Call the token endpoint and store the access token and expiration time in a Data Store
  2. Use router filters to branch the scenario depending on how soon the access token expires
  3. If token expires too soon, use the branch that will call the token endpoint again. Otherwise, proceed normally.

Picture:

This is tedious because I have to make changes to both branches of the scenario whenever I make any change. I’m looking for a way to simply this.

When I use Insomnia to test an API I can set a header to use the response of another API call. Is there something similar in Make.com? Or am I misunderstanding how the OAuth 2.0 HTTP module is supposed to work?

I suppose I could have the access token refreshed every 15 min on a schedule during the day so it would never expire, but I’d like to avoid doing that.

Hello!!

It looks like this API implements Oauth2 Client Credentials. It’s not provided out of the box in the HTTP App, but a workaround is to create a Custom App (since it allows you to create a client Credentials flow). If configured correctly, the token will be automatically refreshed by Make when the token expire.

To make sure it’s really Client Credentials, can you please give me the URL to their API documentation?

Benjamin

1 Like

Hi Benjamin,

Thank you for the reply. The URL for the Authentication endpoint is https://developer.walmart.com/api/us/mp/auth

I use "grant_type":"client_credentials" when generating token with my API credentials.

1 Like

Thanks!!

So you didn’t use authorization_grant because you we’re not allowed to create a client app in their system, right?

1 Like

So you didn’t use authorization_grant because you we’re not allowed to create a client app in their system, right?

That’s correct.

Let me DM you; we’ll update the topic with the end-solution after

2 Likes

Any update on a solution?

I received instructions on creating a custom app for Walmart. It works well but I still need to polish it up because some behaviors are not the same as an official Make app.

Hello @KathyKitty,

I did and shared a new custom app with @skanfklwef, but it’s a bit complex to share everything here. Can you please send me a direct message so that I try to share things with you?

Benjamin

May I suggest you could do a mini video tutorial/showcase so that future readers can easily follow without having to each DM you directly.

1 Like

Good idea. Let me prep something I will share asap

Benjamin

@KathyKitty, @samliew, I created a new topic here: Creating a new custom app for the Walmart Marketplace API using Oauth2 Client Credentials

If you try it and find errors, please let me know so that I correct it.

Cheers

Benjamin

3 Likes