Exchange client credentials for an access token (client_credentials grant).
This is a standalone function alternative to SoundCloudClient.Auth.getClientToken.
Your SoundCloud application's OAuth client ID
Your SoundCloud application's OAuth client secret
The OAuth token response
When authentication fails (e.g. invalid credentials)
import { getClientToken } from 'soundcloud-api-ts';const token = await getClientToken('YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET');console.log(token.access_token); Copy
import { getClientToken } from 'soundcloud-api-ts';const token = await getClientToken('YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET');console.log(token.access_token);
https://developers.soundcloud.com/docs/api/explorer/open-api#/oauth2/post_oauth2_token
Exchange client credentials for an access token (client_credentials grant).
This is a standalone function alternative to SoundCloudClient.Auth.getClientToken.