Skip to content

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

Open
@smaeda-ks

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

wontfixThis will not be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions