soundcloud-api-ts 1.6.3 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -4
- package/dist/{chunk-LNMDNQSC.js → chunk-TDMKITMS.js} +2 -2
- package/dist/{chunk-LNMDNQSC.js.map → chunk-TDMKITMS.js.map} +1 -1
- package/dist/{chunk-TZWEL7VA.mjs → chunk-ZK2KWVSV.mjs} +2 -2
- package/dist/{chunk-TZWEL7VA.mjs.map → chunk-ZK2KWVSV.mjs.map} +1 -1
- package/dist/cli.js +6 -6
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +63 -63
- package/dist/index.mjs +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[]()
|
|
10
10
|
[](https://twin-paws.github.io/soundcloud-api-ts/)
|
|
11
11
|
|
|
12
|
-
A fully-typed TypeScript client for the SoundCloud API. Zero dependencies, native `fetch`, built-in OAuth 2.
|
|
12
|
+
A fully-typed TypeScript client for the SoundCloud API. Zero dependencies, native `fetch`, built-in OAuth 2.1 + PKCE, automatic retry, and an interactive CLI.
|
|
13
13
|
|
|
14
14
|
## Why soundcloud-api-ts?
|
|
15
15
|
|
|
@@ -29,7 +29,7 @@ A fully-typed TypeScript client for the SoundCloud API. Zero dependencies, nativ
|
|
|
29
29
|
| --- | --- | --- | --- |
|
|
30
30
|
| TypeScript | ✅ Native | ✅ | ✅ |
|
|
31
31
|
| Dependencies | **0** | 1 | 3 (lodash, cookie, undici) |
|
|
32
|
-
| Auth method | **Official OAuth 2.
|
|
32
|
+
| Auth method | **Official OAuth 2.1** | ⚠️ Scrape client ID from browser | ⚠️ Scrape client ID from browser |
|
|
33
33
|
| PKCE support | ✅ | ❌ | ❌ |
|
|
34
34
|
| Auto token refresh | ✅ on 401 | ❌ | ❌ |
|
|
35
35
|
| Auto retry (429/5xx) | ✅ exponential backoff | ❌ | ❌ |
|
|
@@ -41,7 +41,9 @@ A fully-typed TypeScript client for the SoundCloud API. Zero dependencies, nativ
|
|
|
41
41
|
| LLM/AI-friendly | ✅ llms.txt + AGENTS.md | ❌ | ❌ |
|
|
42
42
|
| Maintained | ✅ 2026 | ✅ 2025 | ✅ 2026 |
|
|
43
43
|
|
|
44
|
-
> **Why does auth method matter?** `soundcloud.ts` and `soundcloud-fetch`
|
|
44
|
+
> **Why does auth method matter?** `soundcloud.ts` and `soundcloud-fetch` use SoundCloud's undocumented internal `api-v2` and require you to scrape your client ID from browser dev tools. This can break anytime SoundCloud changes their frontend, and may violate the [API Terms of Use](https://developers.soundcloud.com/docs/api/terms-of-use) which state *"you must register your app"* and *"any attempt to circumvent this and obtain a new client ID and Security Code is strictly prohibited."*
|
|
45
|
+
>
|
|
46
|
+
> `soundcloud-api-ts` uses the **official documented API** (`api.soundcloud.com`) with registered app credentials, OAuth 2.1 as specified by SoundCloud, PKCE for public clients, and automatic token refresh.
|
|
45
47
|
|
|
46
48
|
## Install
|
|
47
49
|
|
|
@@ -115,7 +117,7 @@ const track = await sc.tracks.getTrack(123456);
|
|
|
115
117
|
const streams = await sc.tracks.getStreams(123456);
|
|
116
118
|
```
|
|
117
119
|
|
|
118
|
-
## OAuth 2.
|
|
120
|
+
## OAuth 2.1 Flow
|
|
119
121
|
|
|
120
122
|
```ts
|
|
121
123
|
import { SoundCloudClient, generateCodeVerifier, generateCodeChallenge } from "soundcloud-api-ts";
|
|
@@ -401,6 +403,18 @@ const sc = new SoundCloudClient({
|
|
|
401
403
|
- **401 errors** trigger `onTokenRefresh` (if configured) instead of retry
|
|
402
404
|
- Backoff formula: `baseDelay × 2^attempt` with jitter
|
|
403
405
|
|
|
406
|
+
## API Terms Compliance
|
|
407
|
+
|
|
408
|
+
This package is built on SoundCloud's **official documented API** (`api.soundcloud.com`) and follows the [API Terms of Use](https://developers.soundcloud.com/docs/api/terms-of-use):
|
|
409
|
+
|
|
410
|
+
- ✅ Uses registered app credentials (client ID + client secret) via OAuth 2.1
|
|
411
|
+
- ✅ No undocumented or internal API endpoints (`api-v2`)
|
|
412
|
+
- ✅ No client ID scraping or credential circumvention
|
|
413
|
+
- ✅ No content downloading, ripping, or stream capture
|
|
414
|
+
- ✅ No content aggregation into alternative streaming services
|
|
415
|
+
|
|
416
|
+
> **Important:** SoundCloud's API Terms prohibit using User Content (audio, tracks, metadata) to train or develop AI/ML models. The "LLM-friendly" features of this package (`llms.txt`, `AGENTS.md`) are for helping AI coding agents **use the package itself** — not for feeding SoundCloud content to AI systems. Please review the [full terms](https://developers.soundcloud.com/docs/api/terms-of-use) before building your application.
|
|
417
|
+
|
|
404
418
|
## AI / LLM Integration
|
|
405
419
|
|
|
406
420
|
This package is designed to be easily used by AI coding agents:
|
|
@@ -1738,5 +1738,5 @@ exports.unrepostPlaylist = unrepostPlaylist;
|
|
|
1738
1738
|
exports.unrepostTrack = unrepostTrack;
|
|
1739
1739
|
exports.updatePlaylist = updatePlaylist;
|
|
1740
1740
|
exports.updateTrack = updateTrack;
|
|
1741
|
-
//# sourceMappingURL=chunk-
|
|
1742
|
-
//# sourceMappingURL=chunk-
|
|
1741
|
+
//# sourceMappingURL=chunk-TDMKITMS.js.map
|
|
1742
|
+
//# sourceMappingURL=chunk-TDMKITMS.js.map
|