英文:
How do i get the client secret in soundcloud api?
问题
我无法解决如何从SoundCloud API获取客户端密钥的问题。我尝试在线搜索,但似乎没有多少人遇到这个问题。我尝试查看响应头和检查中的网络选项卡等,但似乎找不到客户端密钥。
英文:
i cant work out how to get the client secret from the soundcloud api,
<?php
require_once 'Services/Soundcloud.php';
$client = new Services_Soundcloud(
'----------', 'client-secret');
$userid = --------;
try {
$response = json_decode($client->get('users/'.$userid.'/tracks'), true);
var_dump($response);
} catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
exit($e->getMessage());
}
?>
I tryed looking online about it but not much people seems to have this problem.
i tryed looking in responce headers and network tab in inspect and loads more, i cant seem to find the client secret.
答案1
得分: 0
对于 Client Secret:
首先,前往 Soundcloud 网站。登录或创建新帐户。注册一个应用程序。创建完应用程序后,您将看到客户端 ID 和客户端密钥。 (实际上,几乎所有类似的 API 都使用这种方法)
另一方面,如果您想获取一个 令牌,只需传递您在注册时获取的 client_id
和 client_secret
进行身份验证并获取令牌。
英文:
For Client Secret:
First, go to Soundcloud website. Log in or create a new account. Register an app. After creation your app you will see Client ID and Client Secret. (Actually nearly all similar APIs are using this approach)
On the other hand, if you want to get a token, then just pass along the client_id
and client_secret
you have acquired at registration to authenticate and get a token.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论