You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

request-oauth

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-oauth

OAuth 1.0a support for request-compose


Version published
Weekly downloads
152K
decreased by-11.37%
Maintainers
1
Install size
307 kB
Created
Weekly downloads
 

Readme

Source

request-oauth

npm-version travis-ci coveralls-status

OAuth 1.0a support for request-compose

var request = require('request-compose').extend({
  Request: {oauth: require('request-oauth')}
}).client

;(async () => {
  try {
    var {res, body} = await request({
      url: 'https://api.twitter.com/1.1/users/show.json',
      qs: {
        screen_name: '[SCREEN NAME]'
      },
      oauth: {
        consumer_key: '[APP ID]',
        consumer_secret: '[APP SECRET]',
        token: '[ACCESS TOKEN]',
        token_secret: '[ACCESS SECRET]',
      }
    })
    console.log(body)
  }
  catch (err) {
    console.error(err)
  }
})()

Options

OptionDescription
Required
consumer_keyOAuth application key
consumer_secretOAuth application secret
private_keyin PEM format, set this key instead of consumer_secret when using RSA-SHA1 signing
tokenuser's access token
token_secretuser's token secret
Defaults
version1.0
signature_methodHMAC-SHA1, RSA-SHA1, PLAINTEXT
transport_methodheader, query, form
Generated
timestamp
nonce
signature
Optional
realm
body_hashbody hash string to use or true to get one generated for you

Keywords

FAQs

Package last updated on 24 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc