# venmojs

> Venmo API wrapper for NodeJS

Latest version **0.0.3** (published 2022-05-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install venmojs
pnpm add venmojs
yarn add venmojs
bun add venmojs
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2022-05-06 |
| First published | 2022-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | pineapplelol |

## Links

- npm: https://www.npmjs.com/package/venmojs
- npm.io page: https://npm.io/package/venmojs

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^3.2.4

## Recent versions

- 0.0.3 (latest) — 2022-05-06
- 0.0.2 — 2022-05-06
- 0.0.1 — 2022-05-05

## README

# venmo-api

A NodeJS wrapper for the Venmo API.

## Usage

### Login

Call `Venmo.login(username, password)` with username and password to sign in, generate an access key, and automatically set it.

### User Information

Call `Venmo.getUserIDfromUsername` to get the userID given a username. This userID is used when retrieving transactions or making payments.

Call `Venmo.getUserInformation` to get information about a user given a username. This information includes

- id: The unique Venmo userID.
- username: The username of the user.
- name: The display name of the user.
- dateJoined: The date the user joined Venmo.
- profilePictureURL: The URL of the user's profile image.

Example:

```json
{
  "id": "0123456789",
  "username": "pineapplelol",
  "name": "Pineapple Lol",
  "dateJoined": "2016",
  "profilePictureURL": "https://pineapple.lol/asset/fronz.png"
}
```

### Transactions

Call `Venmo.getTransactions` with a userID to retrieve a list of transactions in the following format:

- date: The date of the transaction.
- note: The message of the transaction.
- action: Typically `charge` or `pay`, for which the actor initiated to the target.
- actor: The actor user (the one who charged or paid) with the following properties:
  - name: The name of the actor user.
  - username: The username of the actor user.
- target: The target user (the one who was charged or paid) with the following properties:
  - name: The name of the target user.
  - username: The username of the target user.

```json
{
  "date": "2018-04-29 4:23PM",
  "note": "Here are your fruit",
  "action": "pay",
  "actor": {
    "name": "Pineapple Lol",
    "username": "pineapplelol"
  },
  "target": {
    "name": "Apple Lol",
    "username": "applelol"
  }
}
```

### Errors

Errors will be thrown if there are invalid credentials (or not passed), or if you hit Venmo's rate limit.

### Example

```js
import Venmo from "venmo-api";

await Venmo.login("pineapplelol", "pineapplesaregreat");

Venmo.getUserIDfromUsername("username")
  .then((id) => {
    return Venmo.getTransactions(id);
  })
  .then((transactions) => {
    console.log(transactions);
  })
  .then(() => {
    Venmo.logout();
  });
```

---
_Source: https://npm.io/package/venmojs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
