bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Error using Oath2.0 when making a request to AmazonS3 server

Open BryanRd4 opened this issue 8 months ago โ€ข 3 comments

I have checked the following:

  • [x] I have searched existing issues and found nothing related to my issue.

This bug is:

  • [ ] making Bruno unusable for me
  • [ ] slowing me down but I'm able to continue working
  • [x] annoying
  • [ ] this feature was working in a previous version but is broken in the current release.

Bruno version

3.2

Operating System

Windows 11

Describe the bug

I use the Oauth2.0 authentication with client credentials. I can see in the collection that it has a access token. But when i want to run a get request to get data i get the folowing error.

InvalidArgument Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified Authorization Bearer eyJraWQiOiJyWFwvTk9NakdPUEdnWFhhdUk2Y2VrNTZnaXNTNnl2djE1TzJPa3B2dkpqbz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjMmFmODVkNi1mOGE5LTQ5ZjAtYTM0Ni00MGFmMWM4MmE5NzkiLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAuZXUtd2VzdC0xLmFtYXpvbmF3cy5jb21cL2V1LXdlc3QtMV9xYnROeVVTUVIiLCJjb2duaXRvOnVzZXJuYW1lIjoiN3Jldmtxb2E4dDUzcjlvbzhlMmY4djMzNXQiLCJvcmlnaW5fanRpIjoiYTA3OTRjMjEtMGI5ZC00YWFhLTkyMjQtNjc1MGU3Yzc5OTNlIiwiYXVkIjoiN3Jldmtxb2E4dDUzcjlvbzhlMmY4djMzNXQiLCJjdXN0b206Ym9QZXJzaXN0ZW5jZUlkIjoiYzFlZDk5MTYtYWVhYy00YThkLWJlMzQtNWU0ZGRiN2NhMjhjIiwiY3VzdG9tOmJvSG9zdFVybCI6ImJvb3FjbG91ZC5jb20iLCJ0b2tlbl91c2UiOiJpZCIsInNjb3BlIjoicGFydG5lclwvb25ib2FyZGluZyBwYXJ0bmVyXC9waW0gcGFydG5lclwvcG9zIiwiY3VzdG9tOmJvRW50ZXJwcmlzZUlkIjoiMTQ4NTMiLCJhdXRoX3RpbWUiOjE3NzUxMzk0NDgsIm5hbWUiOiIxNDg1MyAwMjIxODMgUkQ0IiwiZXhwIjoxNzc1MTQzMDQ4LCJpYXQiOjE3NzUxMzk0NDgsImp0aSI6ImQ1OGJiYzc3LTQ2NzAtNDUwOS1iOThjLTlhMGYzMmIyM2QzZiIsImVtYWlsIjoiYXdzKzE0ODUzXzAyMjE4M19SRDRAZWlqc2luay5ubCJ9.FNQmBsrbE09CKA3Z-sHuDx3FG96qkczEo1Meq4zCQ_FraCEFBkCBPjO9D1zR9_4MqX0NfPi21pRRWPspoWneDBUXacdDds3a-dGfrC5q7DgvBkM_2RdsmuBc2ZL-BDr5zD3_srJDa1b9TLM_GRgXLyH56FvOdsNaDMyInm-uVjbZ-r-BbRqrDuPFVbu45ohYFORnUoPmXvuVFiEKxkqFJcu4Euk5rl_3CAwFalYo1zN9srOsKw6b_Kd7HbAqllMH7HXFpcHpde7zagQdsdEVHVITsNg3M1-_OekJe1bOqYwcMGmHLvywplULT5OLTZKc9rt5VNeEe3HpRC6SGUO42g VHCTVK5BC8YZTCY2 qjkFg/Sft4sTWTrjWO4cIafVXfqxuVgomUgyX3ejlklu7i8diyNpwYp9oUOpGFMnNyTZvOIvdC7hgXOFDRuvjc05cGMGwgf8

I tried everything. I have a POST request for the token and when i have the access token en put the get request on bearer token and use it I get the same error. I really hope u can help me because i dont want to use Postman. The collection i got from the external company works in Postman but not in Bruno and it is very annoying.

.bru file to reproduce the bug

Screenshots/Live demo link

Image Image Image Image

BryanRd4 avatar Apr 02 '26 14:04 BryanRd4

๐Ÿ”— Related PRs

usebruno/bruno#7220 - fix: oauth2 credential management improvements [merged] usebruno/bruno#7482 - feat: add OAuth 1.0 authentication support [merged]


๐Ÿ“ Issue Planner

Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

  • [ ] Create Plan

๐Ÿงช Issue enrichment is currently in open beta.

You can configure auto-planning by selecting labels in the issue_enrichment configuration.

To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

issue_enrichment:
  auto_enrich:
    enabled: false

๐Ÿ’ฌ Have feedback or questions? Drop into our discord!

coderabbitai[bot] avatar Apr 02 '26 14:04 coderabbitai[bot]

In your collection settings, in the add your token to dropdown, select URL instead of Headers. Should work then

Image

dsl3zm avatar May 11 '26 20:05 dsl3zm

Thanks for the details, and thanks @dsl3zm for the pointer.

Here's what's likely going on. Your screenshots show the request going out with an Authorization: Bearer โ€ฆ header (that's the exact value AWS echoes back in <ArgumentValue>), and the booqcloud endpoint is AWS-fronted and rejects the request as soon as that header is present. The token itself is never even evaluated.

The reason it works in Postman but not Bruno is the token placement. This collection sends the OAuth2 token as a URL query parameter (Postman's "Add auth data to: Request URL"), not as an Authorization header. On Bruno 3.2 (the version in this report), the Postman importer didn't carry that placement setting across, so Bruno defaulted the token into the header, which is what AWS rejects.

That import mapping has since been fixed, and it's in the current release (4.1.0). So you have two options:

  1. Update to the latest version and re-import the Postman collection. The token placement should now come across as URL.
  2. Or, without re-importing, just set it manually: in your OAuth2 auth settings, change Add token to from Headers to URL. That drops the Authorization header and sends the token as ?access_token=โ€ฆ instead, clearing the AWS error. (Double-check the query-param key matches what the API expects; Bruno defaults it to access_token.)

Could you give one of those a try on 4.1.0 and let us know how it goes? If it still fails after that, please drop a comment with your request URL (signature redacted) and we'll reopen and take another look.

sreelakshmi-bruno avatar Aug 05 '26 13:08 sreelakshmi-bruno