# soundcloud-key-fetch

> Fetch a SoundCloud API key without owning a SoundCloud app!

Latest version **1.0.13** (published 2022-09-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install soundcloud-key-fetch
pnpm add soundcloud-key-fetch
yarn add soundcloud-key-fetch
bun add soundcloud-key-fetch
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2022-09-06 |
| First published | 2020-06-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | uwusyl |
| Maintainers | uwusyl |
| Keywords | soundcloud, soundcloud api, soundcloud api key, soundcloud key, soundcloud token, soundcloud api token |

## Links

- npm: https://www.npmjs.com/package/soundcloud-key-fetch
- Repository: https://gitlab.com/sylviiu/soundcloud-key-fetch
- Homepage: https://gitlab.com/sylviiu/soundcloud-key-fetch#readme
- Issues: https://gitlab.com/sylviiu/soundcloud-key-fetch/issues
- npm.io page: https://npm.io/package/soundcloud-key-fetch

## Recent versions

- 1.0.13 (latest) — 2022-09-06
- 1.0.12 — 2022-09-06
- 1.0.11 — 2020-11-24
- 1.0.10 — 2020-11-21
- 1.0.9 — 2020-11-20
- 1.0.8 — 2020-11-20
- 1.0.7 — 2020-08-04
- 1.0.6 — 2020-06-29
- 1.0.5 — 2020-06-28
- 1.0.4 — 2020-06-28
- 1.0.3 — 2020-06-28
- 1.0.2 — 2020-06-27
- 1.0.1 — 2020-06-27
- 1.0.0 — 2020-06-27

## README

# [soundcloud-key-fetch](https://www.npmjs.com/package/soundcloud-key-fetch) — *[GitLab](https://gitlab.com/syqwq/soundcloud-key-fetch)*
A simple module to fetch a SoundCloud API key without owning an application, requiring no dependencies!
```
npm i soundcloud-key-fetch
```
or 
```
yarn add soundcloud-key-fetch
```
---
## API
### sckey.fetchKey()
- Returns a string of an API token that was scraped from SoundCloud. ***Note:*** *This token contains no extra special privileges in the API, such as SoundCloud GO access; the token only provides the same amount of access as a user listening to SoundCloud without an account has.*

### sckey.testKey(key)
- Returns a boolean on whether or not the given key is valid. This function tests a given key against a SoundCloud API endpoint, and will verify it based on the response code given by the server. It will return "true" if the server responds with 404 or 200, "false" if the server responds with 401 or 403.

## Usage
#### Fetching a SoundCloud key
```javascript
const sckey = require('soundcloud-key-fetch');

sckey.fetchKey().then(key => {
    console.log(key)
});

// the function initially returns a promise, so you can either use the example above *or* you can call "await" like the example below.

const key = await sckey.fetchKey();
```

#### Testing a SoundCloud key
```javascript
const sckey = require('soundcloud-key-fetch');
	
sckey.testKey('SC-KEY').then(result => {
	// returns a boolean; true/false
	if(result) {
		console.log('The key works!')
	} else {
		console.log('The key didn\'t work.')
	}
});

// the function initially returns a promise, so you can either use the example above *or* you can call "await" like the example below.

const test = await sckey.testKey('SC-KEY');
```

huge thank you to [Zack Radisic](https://github.com/zackradisic/) for helping me out a ton w this package

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