Soundcloud OAuth2 API:用户连接后出现 invalid_scope 错误 [英] Soundcloud OAuth2 API: Getting invalid_scope error after user connection

查看:286
本文介绍了Soundcloud OAuth2 API:用户连接后出现 invalid_scope 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实现 Soundcloud 连接,但遇到了一个奇怪的问题.

I'm trying to implement Soundcloud connect and having a weird issue.

我做的第一件事就是将我的用户发送到

First thing I do is send my users to

https://soundcloud.com/connect?client_id=MY_CLIENT_ID&redirect_uri=http://myredirecturl.example.com&state=RANDOM_STRING&display=page&response_type=code&scope=email

当用户连接时,他们被重定向到

When users connect they get redirected to

http://myredirecturl.example.com?error=invalid_scope&error_description=The+requested+scope+is+invalid%2C+unknown%2C+or+malformed.&state=RANDOM_STRING

如果我使用 scope=*,也会发生同样的情况.

The same happens if I use scope=*.

但是,如果我使用 scope=non-expiring 它可以让我通过,但我需要用户的电子邮件,而这种类型的范围没有足够的授权.

However, if I use scope=non-expiring it lets me go through, but I need the users email and that type of scope doesn't have enough grants.

我认为这与我的应用程序处于开发模式有关,但 Soundcloud 的 Osman 说没有't.

I thought it had something to do with my app being in development mode, but Osman at Soundcloud said it doesn't.

谢谢.

推荐答案

电子邮件"范围并非对所有集成都可用.它用于一些自定义集成,这些集成为我们提供了可接受的服务条款/隐私政策.无法使用 SoundCloud API 获取用户的电子邮件地址.

The 'email' scope is not available to all integrations. It's used for a few custom integrations that have provided us with accepted terms of service / privacy policies. There is no way to get a user's email address using the SoundCloud API.

但是,您应该能够使用*"范围来获取过期的访问令牌.我会与我们的应用团队核实,看看为什么会出现错误.一旦我有更多信息,我会编辑我的答案.

You should however be able to use the '*' scope to get an expiring access token. I'll check with our app team to see why this is giving you an error. I'll edit my answer once I have more information there.

出于您的目的,我将保留非到期"范围,并简单地提示用户输入他们的电子邮件地址(为他们提供一种同意您的使用条款/隐私信息的方式).

For your purposes, I would stay with the 'non-expiring' scope and simply prompt a user for their email address (providing them with a way to agree to your terms of use / privacy information).

这篇关于Soundcloud OAuth2 API:用户连接后出现 invalid_scope 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆