xdevplatform / postman-twitter-ads-api

Postman collection for the Twitter Ads API
MIT License
45 stars 14 forks source link

[Known Issue] OAuth1.0a request fail when query param contain special character #2

Open smaeda-ks opened 5 years ago

smaeda-ks commented 5 years ago

Issue

A good example is one of our index (GET) API endpoints called Cards Fetch. There's a required parameter card_uris and this value includes non-URI friendly characters such as card://1044294149527166979.

In this case, :// can be problematic. These are reserved characters (gen-delims) RFC3986 defines. Even though the OAuth library that Postman client is using encodes these characters in its OAuth signature creation stage, Postman client itself doesn't encode these characters (URI) when sending a request. So this causes the OAuth signature mismatch.

Screen Shot 2019-11-27 at 12 56 01

Workaround

If you're facing this issue, you can use this Pre-request script: https://github.com/twitterdev/postman-twitter-ads-api/blob/master/scripts/pre-request.js

  1. Copy & Past the above script into your request's Pre-request editor.
  2. Disable Authorization type to No Auth
  3. Send request
Screen Shot 2019-05-21 at 15 43 53

Please be noted that disabling Authorization as described above is for individual request objects. Please do not apply this to your top-level object.

9c0c838c63a1730dce202a62a197b693

Workaround (option 2)

If you're facing this issue for a POST request, you can use Body tab rather than Params tab.

  1. Disable all params in Params tab
  2. Open Body tab and click x-www-form-urlencoded then add params as needed
Screen Shot 2019-05-21 at 15 39 24
andypiper commented 3 years ago

Postman 8.7.0 should resolve this issue.

Developer354 commented 4 months ago

24 #29 #29 #29 #27 #25 #10 #11 #1 #7 #3

Developer354 commented 4 months ago

workspace.postman_globals.json __