【问题标题】:Can I access SoundCloud API without authenticating?我可以在不进行身份验证的情况下访问 SoundCloud API 吗?
【发布时间】:2014-04-29 14:55:37
【问题描述】:

我正在使用java-api-wrapper 在 Java 中使用 SoundCloud API,我想在不进行身份验证的情况下访问资源。

在readme示例中,用法是:

ApiWrapper wrapper = new ApiWrapper("client_id", "client_secret", null, null);

// Do I HAVE to do this?
wrapper.login("username", "password");

HttpResponse resp = wrapper.get(Request.to("/me"));
HttpResponse resp =
    wrapper.put(Request.to("/me")
        .with("user[full_name]", "Che Flute",
            "user[website]",   "http://cheflute.com")
        .withFile("user[avatar_data]", new File("flute.jpg")));

我该怎么做?

【问题讨论】:

  • 你试过没有那个声明吗?

标签: java api authentication soundcloud


【解决方案1】:

Soundcloud 依靠登录时生成的令牌来满足您的请求。没有客户,您的客户将毫无用处。

【讨论】:

    【解决方案2】:

    github 上的 API 文档看来,当没有用户名或密码时会引发异常。所以我认为你不能在没有身份验证的情况下使用 API。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-01-07
      • 1970-01-01
      • 2023-03-29
      • 2017-05-30
      • 1970-01-01
      • 2013-02-28
      • 1970-01-01
      相关资源
      最近更新 更多