GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - austenstone/venmo-typescript: Venmo API fetch library

BranchesTags
Open more actions menu

Latest commit

 

History

44 Commits
44 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
tests
tests
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
jest.config.ts
jest.config.ts
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Venmo Typescript · npm version

Typescript/Javascript library for interacting with the Venmo API.

Examples

Payment

This example will login and request $1.00 from the users listed in USERNAMES.

- Negative amounts are payment requests.
+ Positive amounts are payments.

// Create a venmo client.
const v = new Venmo();
await v.easyLogin(process.env.EMAIL, process.env.PASSWORD);

const usernames = process.env.USERNAMES?.split(',') || [];
// For each recipient username
for (const username of usernames) {
    // Query user so we can get the id.
    const userResponse = await v.userQuery(username);
    const user = userResponse?.find(
        (user) => user.username.toLowerCase() === username.toLowerCase()
    );
    if (user) {
        // Request payment with the user id.
        const paymentRes = await v.pay(user.id, -1, 'Note for transaction.', 'private');
    }
}

Deal with 2FA OTP code

You can deal with 2FA by passing a callback function that returns the otp code. In this example we are using stdin to have the user manually type the code they get via SMS.

import { Venmo } from "venmo-typescript";
import readline from 'readline';

const v = new Venmo();
await v.easyLogin(process.env.EMAIL, process.env.PASSWORD, async () => {
  return await new Promise((res) => {
    readline.createInterface({
      input: process.stdin,
      output: process.stdout
    }).question('Enter OTP code:', (answer) => res(answer))
  });
});

Get My Profile

import { Venmo } from "venmo-typescript";

const v = new Venmo();
await v.easyLogin(process.env.EMAIL, process.env.PASSWORD);
console.log(await v.getUserProfile());

Manual Login

You can also manually login and manage the otp code yourself. See how easyLogin works.

About

Venmo API fetch library

www.npmjs.com/package/venmo-typescript

Topics

typescriptvenmovenmo-api

Resources

Readme

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

3 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

Generated from austenstone/typescript-node
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.