OUATH2
Posted: Fri Mar 22, 2024 5:58 pm
Can anyone see what I am doing wrong? I am trying to get an ouath token from UPS . For user id I am sending the client id and for password i am sending the ups secret password.
http_setAuth(HTTP_AUTH_BASIC: 'userid': 'pass');
http_setOption('timeout': '30');
http_setOption('network-ccsid': '1208');
http_debug(*ON: '/home/mydebuglog.txt');
rc = http_req( 'PUT'
:'https://wwwcie.ups.com/security/v1/oauth/token'
: *omit
: ResultStr // String to receive the results
: *omit
//: %trimr(data)
: 'application/json');
part of debug log :
senddoc(): entered
application/json
recvresp(): entered
HTTP/1.1 401 Unauthorized
Content-Type: application/json
errorcode: 10401
errordescription: ClientId is Invalid
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
Access-Control-Max-Age: 600
http_setAuth(HTTP_AUTH_BASIC: 'userid': 'pass');
http_setOption('timeout': '30');
http_setOption('network-ccsid': '1208');
http_debug(*ON: '/home/mydebuglog.txt');
rc = http_req( 'PUT'
:'https://wwwcie.ups.com/security/v1/oauth/token'
: *omit
: ResultStr // String to receive the results
: *omit
//: %trimr(data)
: 'application/json');
part of debug log :
senddoc(): entered
application/json
recvresp(): entered
HTTP/1.1 401 Unauthorized
Content-Type: application/json
errorcode: 10401
errordescription: ClientId is Invalid
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
Access-Control-Max-Age: 600