The use of --libcurl <file> showed us that we were not setting option 
CURLOPT_USERAGENT.  The AWS server on which the service runs required the 
information.

Thanks again!

Bob Sorrells
Software Engineer/Software Developer
AT&T Entertainment Group (AEG), DirecTV Account
(314) 212-7692 (office)


-----Original Message-----
From: curl-library <curl-library-boun...@lists.haxx.se> On Behalf Of Bob 
Sorrells via curl-library
Sent: Tuesday, February 14, 2023 1:31 PM
To: libcurl development <curl-library@lists.haxx.se>
Cc: Bob Sorrells <rober...@amdocs.com>
Subject: RE: libcurl results in 403 when command-line curl works fine

CAUTION: This email is from an external source. Please do not open any unknown 
links or attachments.

Thank you, sir!

We chose option #2 -- we generated the program, compiled and linked it, and it 
worked.

We will compare what it generated to what we have coded.  If we still have an 
issue, I will come back to the forum.

Again, thanks so much.


Bob Sorrells
Software Engineer/Software Developer
AT&T Entertainment Group (AEG), DirecTV Account
(314) 212-7692 (office)



-----Original Message-----
From: curl-library <curl-library-boun...@lists.haxx.se> On Behalf Of Patrick 
Monnerat via curl-library
Sent: Tuesday, February 14, 2023 12:42 PM
To: curl-library@lists.haxx.se
Cc: Patrick Monnerat <patr...@monnerat.net>
Subject: Re: libcurl results in 403 when command-line curl works fine

CAUTION: This email is from an external source. Please do not open any unknown 
links or attachments.

On 2/14/23 19:24, Bob Sorrells via curl-library wrote:
> Hello,
>
> I am working on a payment API that requires "Authentication: Bearer" 
> authentication.  My libcurl code to retrieve the bearer token is working 
> fine.  The token is passed to the header of an API call that submits a 
> payment.  The API is running on AWS.  I am sending the request via a proxy 
> server.
>
> I have a command-line version of the libcurl that is working just fine.  
> However, my C implementation is reliably generating a 403 Forbidden.
>
> In my C implementation I have installed the "standard" debug.c machinery to 
> match the "--trace-ascii" output from the curl executable.  I have put the 
> traces up side-by-side with the Beyond Compare tool and I see only one 
> notable difference, which looks like the attached.  I apologize for the 
> image, but it was the only way I could include pertinent information while 
> redacting sensitive material.

Your diff output only shows what is received, not the request: the problem 
probably comes from what is in the request.

2 suggestions:

1) You post to this list the request contents diff (after having obfuscated 
confidential data, of course): we need more information to help you.

2) Use run your working curl command with additional argument --libcurl
<filename>: this will generate a file called <filename> containing a C program 
skeleton corresponding to the submitted request. You can then compare it to 
what you coded in your program.

Patrick

--
Unsubscribe: 
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.haxx.se%2Flistinfo%2Fcurl-library&data=05%7C01%7CRobertSo%40amdocs.com%7Ccc7e4a0a0bcd4a70b35c08db0ec20daa%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C638119998849575987%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xDKS%2FJw0bcAvzjGd4%2BpLE%2Bpci940UYMl39SSQVb%2BQAU%3D&reserved=0
Etiquette:   
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcurl.se%2Fmail%2Fetiquette.html&data=05%7C01%7CRobertSo%40amdocs.com%7Ccc7e4a0a0bcd4a70b35c08db0ec20daa%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C638119998849575987%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=q%2F9GGqHKyLJWqri%2FhTVCwrO9lrTOTHW9P%2F%2BUP7xt03w%3D&reserved=0

This email and the information contained herein is proprietary and confidential 
and subject to the Amdocs Email Terms of Service, which you may review at 
https://www.amdocs.com/about/email-terms-of-service 
<https://www.amdocs.com/about/email-terms-of-service>

-- 
Unsubscribe: 
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.haxx.se%2Flistinfo%2Fcurl-library&data=05%7C01%7CRobertSo%40amdocs.com%7Ccc7e4a0a0bcd4a70b35c08db0ec20daa%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C638119998849575987%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xDKS%2FJw0bcAvzjGd4%2BpLE%2Bpci940UYMl39SSQVb%2BQAU%3D&reserved=0
Etiquette:   
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcurl.se%2Fmail%2Fetiquette.html&data=05%7C01%7CRobertSo%40amdocs.com%7Ccc7e4a0a0bcd4a70b35c08db0ec20daa%7Cc8eca3ca127646d59d9da0f2a028920f%7C0%7C0%7C638119998849732226%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=t9zFpjMVl1PmSwJ7XioVplL2EtlOH51FKFZMDTCBX4o%3D&reserved=0

This email and the information contained herein is proprietary and confidential 
and subject to the Amdocs Email Terms of Service, which you may review at 
https://www.amdocs.com/about/email-terms-of-service 
<https://www.amdocs.com/about/email-terms-of-service>

-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to