I am new to Postman. I hope this is what you’re looking for. Code Snippet and select HTTP. From Postman…. GET /535b2d87-664f-415a-b7fa-fd3f1086d450/oauth2/token HTTP/1.1 Host: login.microsoftonline.com Authorization: Bearer null Cookie: fpc=AmlHew07s8NFsD-l8jtX0Ief_YrjAQAAANvp2tcOAAAA; stsservicecookie=ests; x-ms-gateway-slice=prod Content-Length: 398 Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="client_id" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="client_secret" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="grant_type" client_credentials ----WebKitFormBoundary7MA4YWxkTrZu0gW My code: URL = ''
+ '?grant_type=client_credentials' + '&client_id=' + %TRIM(ClientID)
+ '&client_secret=' + %Trim(ClientSecret);
http_xproc( http_point_addl_header: %paddr(AddHeader));
rc = http_req('GET'
: URL
: '/tmp/httpauth.json');
*inlr = *on;
P AddHeader B
D PI D Header 32767a varying
D CRLF C x'0d25'
Header = 'Authorization: Bearer null' + CRLF;
P E Httplog http_long_ParseURL(): entered
do_oper(GET): entered There are 0 cookies in the cache
GET /535b2d87-664f-415a-b7fa-fd3f1086d450/oauth2/token?grant_type=client_credentials&client_id=XXXXXXXXXXXXXXXXXXXXXXX&client_secret=XXXXXXXXXXXXXXXXXXXXXXXXXX HTTP/1.1 Host: login.microsoftonline.com
User-Agent: http-api/1.43
Authorization: Bearer null
recvresp(): entered HTTP/1.1 200 OK Cache-Control: no-store, no-cache Pragma: no-cache Content-Length: 150398 Content-Type: text/html; charset=utf-8 In the stmf that comes back, it states the end point is used for POST, OPTIONS. I asked the support staff from Altria about this and the response was “Please make sure the client_id,client_secret&grant_type are sent in the ‘body’ of the
call rather than ‘parameters’.” From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
On Behalf Of Brad Stone
Well, if you have Postman working, post the raw HTTP request from postman, and if HTTPAPI can do a debug to show the exact request made, post that as well and maybe we can tell where the difference is. On Wed, Mar 10, 2021 at 10:58 AM Weaver, Corby <corby.weaver@xxxxxxxxxxxxx> wrote:
|
-- _______________________________________________ Ftpapi mailing list Ftpapi@xxxxxxxxxxxxxxxxxxxxxx http://scottklement.com/mailman/listinfo/ftpapi