[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ftpapi Digest, Vol 115, Issue 4
Hi Scott,
Please help me with this issue.
I learnt that the BODY is not necessary to get the OAuth token. I did
the following changes-
1. Removed the Body part from the code
2. Changed the Content-Type to 'application/json'
http_setauth is working fine as I can see the Header getting generated
correctly for Authorization.
The code is still returning with BAD_REQUEST error. Is there a way to
get the complete Request to show in the log somehow? I have the
http_debug as ON.
Here's the code and the debug log-
Code-
D authUrl � � � � S � � � � � 1024A � Inz
D authToken � � � S � � � � � � 24A � Inz
/copy qrpglesrc,httpapi_h
/copy qrpglesrc,errno_h � /include qrpglesrc,yajl_h
D getAuthToken � �PR � � � � � �24A
P getAuthToken � �B � � � � � � � � � Export � � � D getAuthToken � �PI � � � � � �24A � � � � � � �� �* � � � � � � � � � � � � � � � � � � � � � � � � D fd � � � � � � �S � � � � � � 10I 0 Inz(3) � � � D CRLF � � � � � �C � � � � � � � � � X'0d25' � �� D rc � � � � � � �S � � � � � � 10I 0 Inz � � � �� D msg � � � � � � S � � � � � �500A � Inz � � � �� D runFlag � � � � S � � � � � � � N � Static � � � D jsonBuf � � � � S � � � � �20000A � Varying � �� �* � � � � � � � � � � � � � � � � � � � � � � � � D dsLogonDetails �DS � � � � � � � � �Static � � � D �dsAuthUsr � � � � � � � � � �24A � � � � � � �� D �dsAuthPwd � � � � � � � � � �24A � � � � � � �� D �dsAuthUrl � � � � � � � � �1024A � � � � � � �� �* getLogonInfo Prototype � � � � � � � � � � � � � � �� D getLogonInfo � �Pr � � � � �1072A � � � � � � � � � �� �* � � � � � � � � � � � � � � � � � � � � � � � � � � � �* Parse Incoming Data from http_url_post_raw � � � � �� D parseHeader � � Pr � � � � � �10I 0 � � � � � � � � �� D � � � � � � � � � � � � � � � 10I 0 Value � � � � � �� D � � � � � � � � � � � � � � � � * � Value � � � � � �� D � � � � � � � � � � � � � � � 10I 0 Value � � � � � �� �/Free � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� � http_debug(*ON : '/tmp/ShubhDebugLog.txt'); � � � � �� � Clear authUrl; � � � � � � � � � � � � � � � � � � � � � // If not run, set static variables � � � � � � � � �� � If Not runFlag; � � � � � � � � � � � � � � � � � � �� � � �runFlag = *On; � � � � � � � � � � � � � � � � � �� � � �// Get logon info � � � � � � � � � � � � � � � � � � � �dsLogonDetails = getLogonInfo(); � � � � � � � � �� � EndIf; � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� � http_setauth(HTTP_AUTH_BASIC : dsAuthUsr : dsAuthPwd);
� http_setCCSIDs( 1208: 0 ); � � � � � � � � � � � � � � � rc = http_url_post_raw( dsAuthUrl � � � � � � � � � � � �� � � � � � � � � � � � � �:%addr(jsonBuf) � � � � � � � � � � � � � � � � � � � � � � �:%len(%trimr(jsonBuf)) � � � � � �� � � � � � � � � � � � � �:1 � � � � � � � � � � � � � � � �� � � � � � � � � � � � � �:%paddr('PARSEHEADER') � � � � � �� � � � � � � � � � � � � �:HTTP_TIMEOUT � � � � � � � � � � � � � � � � � � � � � � � �:HTTP_USERAGENT � � � � � � � � � � � � � � � � � � � � � � �:'application/json' ); � � � � � �� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� � If rc <> 1; � � � � � � � � � � � � � � � � � � � � � � �� � � �msg = http_error; � � � � � � � � � � � � � � � � � � � � � �Clear authToken; � � � � � � � � � � � � � � � � � � �� � EndIf; � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� � Return authToken; � � � � � � � � � � � � � � � � � � � �� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� �/End-Free � � � � � � � � � � � � � � � � � � � � � � � � � Debug Log-
HTTPAPI Ver 1.17 released 2006-09-23 � � � � � � � � � � � � � � � � � � � � � � � �� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
� � � � � � � http_setauth(): entered � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � New iconv() objects set, PostRem=1208. PostLoc=0. ProtRem=819.
ProtLoc=0 � � � � � �� http_persist_open(): entered � � � � � � � � � � � � � � � � � � � � � � � � � � � �� http_long_ParseURL(): entered � � � � � � � � � � � � � � � � � � � � � � � � � � � � https_init(): entered � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � -----------------------------------------------------------------------
--------------
Dump of local-side certificate information: � � � � � � � � � � � � � � � � � � � � � -----------------------------------------------------------------------
--------------
-----------------------------------------------------------------------
--------------
Dump of server-side certificate information: � � � � � � � � � � � � � � � � � � � �� -----------------------------------------------------------------------
--------------
Cert Validation Code = 6000 � � � � � � � � � � � � � � � � � � � � � � � � � � � � � -----BEGIN CERTIFICATE----- � � � � � � � � � � � � � � � � � � � � � � � � � � � � � MIIFQDCCBCigAwIBAgIIGMlF8bmCI9kwDQYJKoZIhvcNAQELBQAwgbQxCzAJBgNV � � � � � � � � � �� udCsbg== � � � � � � � � � � � � � � � � � � � � � �� -----END CERTIFICATE----- � � � � � � � � � � � � � � Serial Number: 18:C9:45:F1:B9:82:23:D9 � � � � � � �� Common Name: *.[1]api.manheim.com � � � � � � � � � � �� Org: Domain Control Validated � � � � � � � � � � � � Issuer CN: Go Daddy Secure Certificate Authority - G2
Issuer Country: US � � � � � � � � � � � � � � � � �� Issuer State/Province: Arizona � � � � � � � � � � �� Issuer Locality: Scottsdale � � � � � � � � � � � � � Issuer Org: GoDaddy.com, Inc. � � � � � � � � � � � � Issuer Org Unit: [2]http://certs.godaddy.com/repository/
Unknown Field: 3 � � � � � � � � � � � � � � � � � �� Unknown Field: 20150723153240 � � � � � � � � � � � � Unknown Field: 15:32:40 23-07-2015 � � � � � � � � �� Unknown Field: 20170723153240 � � � � � � � � � � � � Unknown Field: 15:32:40 23-07-2017 � � � � � � � � �� Unknown Field: 1.2.840.113549.1.1.11 � � � � � � � �� � � � � � � � � � � � � � � � � � � � � � � � � � � � Protocol Used: TLS Version 1 � � � � � � � � � � � �� http_persist_post(): entered � � � � � � � � � � � �� http_long_ParseURL(): entered � � � � � � � � � � � � do_post(): entered � � � � � � � � � � � � � � � � �� POST /oauth2/token � � � � � � � � � � � � � � � � �� Host: [3]integration1.api.manheim.com � � � � � � � � �� User-Agent: http-api/1.17 � � � � � � � � � � � � � � Content-Type: application/json � � � � � � � � � � �� Expect: 100-continue � � � � � � � � � � � � � � � �� Content-Length: 0 � � � � � � � � � � � � � � � � � � Authorization: Basic c2h2bWFoNXB1dTZ5OGsydGFkNTZ3eWdlOjN3Q0NjZ3VyRzg=
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � recvresp(): entered � � � � � � � � � � � � � � � � � � � � � � � � � HTTP/1.1 400 BAD_REQUEST � � � � � � � � � � � � � � � � � � � � � �� Content-Length: 0 � � � � � � � � � � � � � � � � � � � � � � � � � � Connection: Close � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � SetError() #13: HTTP/1.1 400 BAD_REQUEST � � � � � � � � � � � � � �� recvdoc parms: identity 0 � � � � � � � � � � � � � � � � � � � � � � header_load_cookies() entered � � � � � � � � � � � � � � � � � � � � recvdoc(): entered � � � � � � � � � � � � � � � � � � � � � � � � �� SetError() #0: � � � � � � � � � � � � � � � � � � � � � � � � � � �� SetError() #13: HTTP/1.1 400 BAD_REQUEST � � � � � � � � � � � � � �� http_close(): entered � � � � � � � � � � � � � � � � � � � � � � � � �************End of Data******************** � � � � � � � � � � � ��
On Thu, May 5, 2016 at 1:53 PM,
<[4]ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Send Ftpapi mailing list submissions to
� � � � [5]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
� � � � [6]http://scottklement.com/mailman/listinfo/ftpapi
or, via email, send a message with subject or body 'help' to
� � � � [7]ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
You can reach the person managing the list at
� � � � [8]ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Ftpapi digest..."
Today's Topics:
� �1. Re: Unable to get a successful HTTPAPI response (Shubhadeep
Roy)
--------------------------------------------------------------------
--
Message: 1
Date: Thu, 5 May 2016 13:53:44 -0400
From: Shubhadeep Roy <[9]shubhadeep.roy@xxxxxxxxx>
To: [10]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Unable to get a successful HTTPAPI response
Message-ID:
� � � � <CAJu=[11]x6-2VdPg8_89yGm676rh37mFVyRaXeD5k6woYW4aX1FOBg@mail.gmail.
com>
Content-Type: text/plain; charset="utf-8"
Hi,
We've made some headway. We added my group profile to all the
directories
and the KDB file with full access. I believe the authorities have
been set
correctly now.
What we are getting now is a HTTP 400 (Bad data) error. Pasted below
is the
debug log and a code snippet. I have removed the certificate for
easier
reading.
The following text needs to be part of the raw Body and this is
where I
feel I am doing the mistake.
{
� � "grant_type":"client_credentials"
}
*I have it in my code as follows-*
�************Beginning of CODE**************
// Set Authorization
http_setauth(HTTP_AUTH_BASIC : dsAuthUsr : dsAuthPwd);
data = '{"grant_type":"client_credentials"}';
size = %len(%trim(data));
rc = http_url_post_raw(dsAuthUrl : %addr(data) : size :
� � � � � � � � � � � �1 : %paddr('PARSEINCOMING'));
// Parse the Header Data
http_xproc(HTTP_POINT_PARSE_HEADER : %paddr('READHDR'));
�************Ending of CODE**************
NOTE: The Host and Authorization from the log below are correct as
compared
with the Postman application
*Debug Log-*
�************Beginning of data**************
HTTPAPI Ver 1.17 released 2006-09-23
New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819.
ProtLoc=0
http_setauth(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
https_init(): entered
--------------------------------------------------------------------
-----------------
Dump of local-side certificate information:
--------------------------------------------------------------------
-----------------
--------------------------------------------------------------------
-----------------
Dump of server-side certificate information:
--------------------------------------------------------------------
-----------------
Cert Validation Code = 6000
-----BEGIN CERTIFICATE-----
MIIFQDCCBCigAwIBAgIIGMlF8bmCI9kwDQYJKoZIhvcNAQELBQAwgbQxCzAJBgNV
udCsbg==
-----END CERTIFICATE-----
Serial Number: 18:C9:45:F1:B9:82:23:D9
Common Name: *.[12]api.manheim.com
Org: Domain Control Validated
Issuer CN: Go Daddy Secure Certificate Authority - G2
Issuer Country: US
Issuer State/Province: Arizona
Issuer Locality: Scottsdale
Issuer Org: GoDaddy.com, Inc.
Issuer Org Unit: [13]http://certs.godaddy.com/repository/
Unknown Field: 3
Unknown Field: 20150723153240
Unknown Field: 15:32:[14]40 23-07-2015
Unknown Field: 20170723153240
Unknown Field: 15:32:[15]40 23-07-2017
Unknown Field: 1.2.840.113549.1.1.11
Protocol Used: TLS Version 1
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /oauth2/token
*Host: [16]integration1.api.manheim.com
<[17]http://integration1.api.manheim.com>
� � � � � � � � � � � � � � � � *
User-Agent: http-api/1.17
Content-Type: text/xml
Expect: 100-continue
Content-Length: 0
*Authorization: Basic
c2h2bWFoNXB1dTZ5OGsydGFkNTZ3eWdlOjN3Q0NjZ3VyRzg=*
recvresp(): entered
HTTP/1.1 400 BAD_REQUEST
Content-Length: 0
Connection: Close
SetError() #13: HTTP/1.1 400 BAD_REQUEST
recvdoc parms: identity 0
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
SetError() #13: HTTP/1.1 400 BAD_REQUEST
http_close(): entered
�************End of Data********************
On Tue, May 3, 2016 at 2:21 PM, Shubhadeep Roy
<[18]shubhadeep.roy@xxxxxxxxx>
wrote:
> Hi,
>
> I am trying to connect to a TIBCO Mashery endpoint to get an Auth
Token
> with a user name and password provided to me.
>
> ?The same request works when I am use Postman application to get
the Auth
> Token with the same credentials. The Auth Token comes in the
Header of the
> Post request.
>
> I am pasting below the code and httpdebug log.? I am not sure if I
am
> populating the variable "data" correctly. In Postman, this text is
sent in
> the Body as can be seen in the embedded image.
>
> ?[image: Inline image 1]?
>
>
> *?Code-*
> P getExtColor� � �B� � � � � � � � � �Export
> D getExtColor� � �PI� � � � � � 30A
> D� ppUserID� � � � � � � � � � �24A� �Value
> D� ppPwd� � � � � � � � � � � � 10A� �Value
> D� ppAuthToken� � � � � � � � � 24A� �Value
> D� ppVin� � � � � � � � � � � � 17A� �Value
> D� ppAuthUrl� � � � � � � � � 1024A� �Value
> D� ppDescUrl� � � � � � � � � 1024A� �Value
> /Free
>
>� � http_debug(*ON : '/tmp/ShubhDebugLog.txt');
>
>� � // Set Authorization
>� � http_setauth(HTTP_AUTH_BASIC : ppUserID : ppPwd);
>
>� � data = '{"grant_type":"client_credentials"}';
>� � size = %len(%trim(data));
>� � rc = http_url_post_raw(ppAuthUrl : %addr(data) : size :
>� � � � � � � � � � � � � �1 :
%paddr('PARSEINCOMING'));
>
>� � http_xproc(HTTP_POINT_PARSE_HEADER : %paddr('READHDR'));
>
>� � If rc <> 1;
>� � � msg = http_error;
>� � Else;
>� � � ...
>� � EndIf;
>
>� � Return extColor;
>
> /End-Free
> P getExtColor� � �E
>
> P readHdr� � � � �B
> D readHdr� � � � �PI
> D� headerData� � � � � � � � �2048A� �const
>� *
> D hdrData� � � � � � � � � � �2048A
>� /Free
>
>� �hdrData = headerData;
>
>� /End-Free
> P readHdr� � � � �E
>
>
>
> *Debug Log*
>� ************Beginning of data**************
>
> HTTPAPI Ver 1.17 released 2006-09-23
>
>
>
> New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819.
ProtLoc=0
>
> http_setauth(): entered
>
> http_persist_open(): entered
>
> http_long_ParseURL(): entered
>
> https_init(): entered
>
> (GSKit) Access to the key database is not allowed.
>
> ssl_error(6003): (GSKit) Access to the key database is not
allowed.
>
> SetError() #24: gsk_env_init: (GSKit) Access to the key database
is not
> allowed.
>
--------------------------------------------------------------------
-----------------
>
> Dump of local-side certificate information:
>
>
--------------------------------------------------------------------
-----------------
>
> (GSKit) An operation which is not valid for the current SSL
session state
> was attempted.
> ssl_error(5): (GSKit) An operation which is not valid for the
current SSL
> session state was attempted.
> (GSKit) An operation which is not valid for the current SSL
session state
> was attempted.
>� ************End of Data********************
>
>� � � � � ?
>
>
>
> --
>
> Warm regards,
> Shubh
> All is well. Everything will be OK!!! - Shubh
>
--
Warm regards,
Shubh
All is well. Everything will be OK!!! - Shubh
-------------- next part --------------
� �Hi,
� �We've made some headway. We added my group profile to all the
� �directories and the KDB file with full access. I believe the
� �authorities have been set correctly now.
� �What we are getting now is a HTTP 400 (Bad data) error. Pasted
below is
� �the debug log and a code snippet. I have removed the
certificate for
� �easier reading.
� �The following text needs to be part of the raw Body and this is
where I
� �feel I am doing the mistake.
� �{
� �?� ?� "grant_type":"client_credentials"
� �}
� �I have it in my code as follows-
� �? ************Beginning of CODE************** ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �// Set Authorization ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?
� �http_setauth(HTTP_AUTH_BASIC : dsAuthUsr : dsAuthPwd); ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ? ?
� �data = '{"grant_type":"client_credentials"}'; ?� ?� ?� ? ?
� �size = %len(%trim(data)); ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �? ?
� �rc = http_url_post_raw(dsAuthUrl : %addr(data) : size :?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? 1 :
%paddr('PARSEINCOMING')); ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ? ?
� �// Parse the Header Data ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?
� �http_xproc(HTTP_POINT_PARSE_HEADER : %paddr('READHDR'));
� �? ************Ending of CODE************** ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �NOTE: The Host and Authorization from the log below are correct
as
� �compared with the Postman application
� �Debug Log-
� �? ************Beginning of data************** ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �HTTPAPI Ver 1.17 released 2006-09-23 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819.
ProtLoc=0
� �?� ?� ?� ?� ?� ?� ?
� �http_setauth(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �http_persist_open(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �http_long_ParseURL(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �https_init(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �------------------------------------------------------------------
-----
� �--------------
� �Dump of local-side certificate information: ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �------------------------------------------------------------------
-----
� �--------------
� �------------------------------------------------------------------
-----
� �--------------
� �Dump of server-side certificate information: ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �------------------------------------------------------------------
-----
� �--------------
� �Cert Validation Code = 6000 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �-----BEGIN CERTIFICATE----- ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �MIIFQDCCBCigAwIBAgIIGMlF8bmCI9kwDQYJKoZIhvcNAQELBQAwgbQxCzAJBgNV
?� ?
� �?� ?� ?� ?� ?� ?� ?� ? ?
� �udCsbg== ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?
� �-----END CERTIFICATE----- ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ? ?
� �Serial Number: 18:C9:45:F1:B9:82:23:D9 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?
� �Common Name: *.[1][19]api.manheim.com ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?
� �Org: Domain Control Validated ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ? ?
� �Issuer CN: Go Daddy Secure Certificate Authority - G2 ?� ?� ?� ?� ? ?
� �Issuer Country: US ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?
� �Issuer State/Province: Arizona ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?
� �Issuer Locality: Scottsdale ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ? ?
� �Issuer Org: GoDaddy.com, Inc. ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ? ?
� �Issuer Org Unit: [2][20]http://certs.godaddy.com/repository/
?� ?� ?� ?
� �? ?
� �Unknown Field: 3 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ? ?
� �Unknown Field: 20150723153240 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?
� �Unknown Field: 15:32:[21]40 23-07-2015 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ? ?
� �Unknown Field: 20170723153240 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?
� �Unknown Field: 15:32:[22]40 23-07-2017 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ? ?
� �Unknown Field: 1.2.840.113549.1.1.11 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ? ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �Protocol Used: TLS Version 1 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ? ?
� �http_persist_post(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ? ?
� �http_long_ParseURL(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?
� �do_post(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ? ?
� �POST /oauth2/token ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ? ?
� �Host: [3][23]integration1.api.manheim.com ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ? ?
� �User-Agent: http-api/1.17 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?
� �Content-Type: text/xml ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ? ?
� �Expect: 100-continue ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ? ?
� �Content-Length: 0 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?
� �Authorization: Basic
c2h2bWFoNXB1dTZ5OGsydGFkNTZ3eWdlOjN3Q0NjZ3VyRzg=
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �recvresp(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �HTTP/1.1 400 BAD_REQUEST ?� ?� ?� ?� ?� ?� ?� ?
� �Content-Length: 0 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �Connection: Close ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �SetError() #13: HTTP/1.1 400 BAD_REQUEST
� �recvdoc parms: identity 0 ?� ?� ?� ?� ?� ?� ? ?
� �header_load_cookies() entered ?� ?� ?� ?� ? ?
� �recvdoc(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �SetError() #0: ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �SetError() #13: HTTP/1.1 400 BAD_REQUEST
� �http_close(): entered ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �? ************End of Data********************
� �On Tue, May 3, 2016 at 2:21 PM, Shubhadeep Roy
� �<[4][24]shubhadeep.roy@xxxxxxxxx> wrote:
� �Hi,
� �I am trying to connect to a TIBCO Mashery endpoint to get an
Auth Token
� �with a user name and password provided to me.?
� �?The same request works when I am use Postman application to
get the
� �Auth Token with the same credentials. The Auth Token comes in
the
� �Header of the Post request.
� �I am pasting below the code and httpdebug log.? I am not sure
if I am
� �populating the variable "data" correctly. In Postman, this text
is sent
� �in the Body as can be seen in the embedded image.
� �? Inline image 1 ?
� �?Code-
� �P getExtColor ?� ?� B ?� ?� ?� ?� ?� ?� ?� ?� ?� Export ?� ?� ?
� �D getExtColor ?� ?� PI ?� ?� ?� ?� ?� ? 30A ?� ?� ?� ?� ?� ?� ? ?
� �D ? ppUserID ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� 24A ?� Value ?� ?� ? ?
� �D ? ppPwd ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? 10A ?� Value ?� ?� ? ?
� �D ? ppAuthToken ?� ?� ?� ?� ?� ?� ?� ?� ? 24A ?� Value
?� ?� ? ?
� �D ? ppVin ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? 17A ?� Value ?� ?� ? ?
� �D ? ppAuthUrl ?� ?� ?� ?� ?� ?� ?� ?� ? 1024A ?� Value
?� ?� ? ?
� �D ? ppDescUrl ?� ?� ?� ?� ?� ?� ?� ?� ? 1024A ?� Value
?� ?� ? ?
� �/Free ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ? ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ? ?
� �?� ? http_debug(*ON : '/tmp/ShubhDebugLog.txt'); ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ? ?
� �?� ? // Set Authorization ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ? ?
� �?� ? http_setauth(HTTP_AUTH_BASIC : ppUserID : ppPwd); ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ? ?
� �?� ? data = '{"grant_type":"client_credentials"}'; ?� ?� ?� ?� ?
� �?� ? size = %len(%trim(data)); ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?
� �?� ? rc = http_url_post_raw(ppAuthUrl : %addr(data) : size :
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� 1 :
%paddr('PARSEINCOMING'));
� �? ?
� �?� ? http_xproc(HTTP_POINT_PARSE_HEADER : %paddr('READHDR'));
?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ? ?
� �?� ? If rc <> 1; ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?
� �?� ?� ? msg = http_error; ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?
� �?� ? Else; ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?
� �?� ?� ? ...
� �?� ? EndIf;
� �?� ? Return extColor; ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �/End-Free ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �P getExtColor ?� ?� E ?
� �P readHdr ?� ?� ?� ?� B ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �D readHdr ?� ?� ?� ?� PI ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �D ? headerData ?� ?� ?� ?� ?� ?� ?� ?� 2048A ?� const
� �? * ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �D hdrData ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� 2048A ?� ?� ?� ?
� �? /Free ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� hdrData = headerData; ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �? /End-Free ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �P readHdr ?� ?� ?� ?� E ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �Debug Log
� �? ************Beginning of data************** ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �HTTPAPI Ver 1.17 released 2006-09-23 ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ? ?
� �New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819.
ProtLoc=0
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �http_setauth(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �http_persist_open(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �http_long_ParseURL(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �https_init(): entered ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �? ?
� �(GSKit) Access to the key database is not allowed. ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �ssl_error(6003): (GSKit) Access to the key database is not
allowed. ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �SetError() #24: gsk_env_init: (GSKit) Access to the key
database is not
� �allowed. ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �------------------------------------------------------------------
-----
� �-------------- ?� ?� ?� ?� ?� ?� ?� ? ?
� �Dump of local-side certificate information: ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?
� �------------------------------------------------------------------
-----
� �-------------- ?� ?� ?� ?� ?� ?� ?� ? ?
� �(GSKit) An operation which is not valid for the current SSL
session
� �state was attempted. ?� ?� ?� ?� ?� ?� ?
� �ssl_error(5): (GSKit) An operation which is not valid for the
current
� �SSL session state was attempted.
� �(GSKit) An operation which is not valid for the current SSL
session
� �state was attempted. ?� ?� ?� ?� ?� ?� ?
� �? ************End of Data******************** ?� ?� ?� ?� ?� ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ? ?� ?� ?
� �?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?� ?
� �?� ? ?
� �--
� �Warm regards,
� �Shubh
� �All is well. Everything will be OK!!! - Shubh
� �--
� �Warm regards,
� �Shubh
� �All is well. Everything will be OK!!! - Shubh
References
� �1. [25]http://api.manheim.com/
� �2. [26]http://certs.godaddy.com/repository/
� �3. [27]http://integration1.api.manheim.com/
� �4. mailto:[28]shubhadeep.roy@xxxxxxxxx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 18158 bytes
Desc: not available
URL:
<[29]http://scottklement.com/pipermail/ftpapi/attachments/20160505/b
6ff299f/attachment.png>
------------------------------
--------------------------------------------------------------------
---
This is the FTPAPI mailing list digest.� To unsubscribe, go to:
[30]http://www.scottklement.com/mailman/listinfo/ftpapi
--------------------------------------------------------------------
---
End of Ftpapi Digest, Vol 115, Issue 4
**************************************
--
Warm regards,
Shubh
All is well. Everything will be OK!!! - Shubh
References
1. http://api.manheim.com/
2. http://certs.godaddy.com/repository/
3. http://integration1.api.manheim.com/
4. mailto:ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
5. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
6. http://scottklement.com/mailman/listinfo/ftpapi
7. mailto:ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
8. mailto:ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx
9. mailto:shubhadeep.roy@xxxxxxxxx
10. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
11. mailto:x6-2VdPg8_89yGm676rh37mFVyRaXeD5k6woYW4aX1FOBg@xxxxxxxxxxxxxx
12. http://api.manheim.com/
13. http://certs.godaddy.com/repository/
14. tel:40%2023-07-2015
15. tel:40%2023-07-2017
16. http://integration1.api.manheim.com/
17. http://integration1.api.manheim.com/
18. mailto:shubhadeep.roy@xxxxxxxxx
19. http://api.manheim.com/
20. http://certs.godaddy.com/repository/
21. tel:40%2023-07-2015
22. tel:40%2023-07-2017
23. http://integration1.api.manheim.com/
24. mailto:shubhadeep.roy@xxxxxxxxx
25. http://api.manheim.com/
26. http://certs.godaddy.com/repository/
27. http://integration1.api.manheim.com/
28. mailto:shubhadeep.roy@xxxxxxxxx
29. http://scottklement.com/pipermail/ftpapi/attachments/20160505/b6ff299f/attachment.png
30. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------