Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

soundcloud-key-fetch

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

soundcloud-key-fetch

Fetch a SoundCloud API key without owning a SoundCloud app!

  • 1.0.13
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

soundcloud-key-fetchGitLab

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
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
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 for helping me out a ton w this package

Keywords

FAQs

Package last updated on 06 Sep 2022

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc