RE: Walmart Marketplace API
Greg Wilburn <gwilburn-kuYYJ3CQfvZxq3Q2jbZZw/[email protected]>
| Newsgroups | gmane.comp.lang.as400.rpg |
|---|---|
| Message-ID | <PH0PR17MB4863AF0BC0499470F0B60161DA14A@PH0PR17MB4863.namprd17.prod.outlook.com> |
Sure...
The clientId and clientSecret are set above this code. I am trying to get an Access Token.
rc = http_setauth(HTTP_AUTH_BASIC :clientID :clientSecret);
// Get an Access Token
http_debug(*on :FLDR + '/' + inCom + '/http_debug.txt');
URL = 'https://marketplace.walmartapis.com/v3/token';
method = 'POST';
form = WebForm_open();
WebForm_setVar(form :'grant_type' :'client_credentials');
body = WebForm_getData(form);
WebForm_close(form);
Response = FLDR + '/' + inCom + '/token_response.json';
Exec Sql set :uuid = generate_uuid();
Ifs_WriteToFile(logFd:'UUID: ' + uuId);
headerVars.partnerId = '10001667921';
headerVars.uniqueId = uuId;
headerVars.serviceName = 'Walmart Marketplace';
headerVars.acceptType = 'application/json';
rc = http_xproc( HTTP_POINT_ADDL_HEADER
: %paddr(addHttpHeaders)
: %addr(headerVars));
rc = http_req( method
: URL
: response
: *omit
: *omit
: body
: 'application/x-www-form-urlencoded');
-----Original Message-----
From: RPG400-L <[email protected]> On Behalf Of Jon Paris
Sent: Monday, September 15, 2025 6:43 PM
To: RPG programming on the IBM i (AS/400 and iSeries) <[email protected]>
Subject: Re: Walmart Marketplace API
Wanna share a code snippet so we can see what you are requesting. I played with this API a while back and had no issues. Nothing special that I can recall.
Jon Paris
[email protected]
> On Sep 15, 2025, at 5:02 PM, Greg Wilburn <[email protected]> wrote:
>
> Just wondering if anyone has implemented this?
>
> Having issues just getting a token using HTTPAPI... the debug log shows an "unknown protocol" error. I'm not sure that I've noticed that before.
>
> Any insight would be appreciated.
>
> SetError() #49: SSL_protocol: Unknown protocol 5000
> Protocol Used:
> http_persist_req(POST) entered.
> http_long_ParseURL(): entered
> http_long_ParseURL(): entered
> do_oper(POST): entered
> There are 0 cookies in the cache
> POST /v3/token HTTP/1.1
> Host: marketplace.walmartapis.com
> User-Agent: http-api/1.43
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 29
> Authorization: Basic - DELETED -
> WM_PARTNER.ID: 10001667921
> WM_QOS.CORRELATION_ID: 82B37F6E-C4A5-4675-AA4B-AC14A2CD33B7
> WM_SVC.NAME: Walmart Marketplace
> Accept: application/json
>
> senddoc(): entered
> grant_type=client_credentials
> recvresp(): entered
> SetError() #44: CommTCP_read: Socket has been shut down.
> recvresp(): end with err
> http_close(): entered
> [Logo]<https://www.totalbizfulfillment.com/> Greg Wilburn
> Director of IT
> 301.895.3792 ext. 1231
> 301.895.3895 direct
> [email protected]<mailto:[email protected]>
> 1 Corporate Dr
> Grantsville, MD 21536
> www.totalbizfulfillment.com<http://www.totalbizfulfillment.com>
> --
> This is the RPG programming on IBM i (RPG400-L) mailing list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: [email protected]
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/rpg400-l.
>
> Please contact [email protected] for any subscription related questions.
>
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact [email protected] for any subscription related questions.
Greg Wilburn
Director of IT
301.895.3792 ext. 1231
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact [email protected] for any subscription related questions.