Coder Social home page Coder Social logo

postman-twitter-ads-api's Introduction

postman-twitter-ads-api

This is a Postman collection for the Twitter Ads API endpoints. Please see the following documentation for more details about the API spec:
https://developer.twitter.com/en/docs/ads/general/overview

twurl (CLI) and Postman (GUI)

Over the years, we've encouraged you to install twurl - our official command-line HTTP client tool, tailored specifically for the Twitter API.
While twurl continues to be a great CLI (command-line interface) tool we love, we also wanted to provide additional options that can optimize your development experience for the Ads API furthermore.

We've received various feedback about the tool. For instance, sometimes CLI tools such as twurl can be cumbersome to set up complicated queries on command line and change on-the-fly in testing. Installing twurl might not be possible (restricted) in a certain scenario as it requires setting up Ruby environment on your machine. We believe Postman could be useful in these situations.

Installation

Quick install

Just click the button below!
Run in Postman
(direct link: https://t.co/postman-ads-api)

  • Make sure you installed the Postman client on your machine then just click Run in Postman button. Or, you could also install this collection from your Postman client directly by opening New => Template then search "Twitter Ads API".

Manual install

Download this repository and import below files into your Postman client:

Name Description
TwitterAdsAPI_postman_collection_v2-1.json main collection file
TwitterAdsAPI_postman_environment.json pre-configured environment file

Update to the latest collection

While we keep this collection up to date by adding new endpoints/removing retired endpoints, your installed collection will not be updated automatically, unfortunately. Therefore, we encourage you to subscribe to this repository and re-install (import) when we release a new version.

Set up your Environment variables

This collection includes a pre-configured environment setting. All you need is just fill in the below variables value in order to run each request (See also the below GIF as to how to open and edit the environment setting):

Name Description
account_id Your Ads Account ID.
version Please use the latest version.
consumer_key
consumer_secret
access_token
token_secret

edf0e81fb6672044f7d14a3af0b5bddb

Authentication

As mentioned above, you need to configure your credentials to environment variables. To get those credentials, please see the following documentation:

You could also use tw-oob-oauth-cli - A simple CLI client for Twitter's OOB OAuth (PIN-based OAuth), to get your tokens.

Please be noted that the Ads API currently only supports OAuth 1.0a.
Also, since this collection is configured to use environment variables for authentication across the requests, you don't need to change the Authorization setting of your top-level object (collection). Please leave it as is as shown below.

Screen Shot 2019-05-01 at 4 07 00

Issues/Questions

In case you have an API-related question (e.g., Ads API usage), please go to the community forum and search/ask with required information. Please submit a new issue only if you have a question about this Postman collection itself.

postman-twitter-ads-api's People

Contributors

smaeda-ks avatar tushdante avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

postman-twitter-ads-api's Issues

Active

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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

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

Twitter

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Twitter

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Twitter

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Mac OS X 10.13.6]
  • Version [e.g. Version 7.0.9]

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.