如何进行身份验证与REDIRECT_URI(callback.html)的SoundCloud API [英] how to authenticate Soundcloud API with redirect_uri (callback.html)

查看:247
本文介绍了如何进行身份验证与REDIRECT_URI(callback.html)的SoundCloud API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的最终目标是让用户能够通过API的SoundCloud上传/下载文件。

The final goal is to let users be able to upload / download files through the soundcloud API.

我已经注册我的应用程序,但现在我已经得到了与身份验证问题。在应用注册我必须定义一个重定向URI进行身份验证,其默认为callback.html。什么放在那里自己吗?

I have registered my app, but now I have got problems with the authentication. In the app registration i must define a redirect URI for authentication, their default is callback.html. What to put there myself?

我不知道要放什么东西在那里,在应用程序中的重定向URI或code(假设它必须是相同的),我试过作出callback.html自己,但它不工作。
我开始觉得它必须是一个网上的链接。但是我只工作在本地主机上。

I dont know what to put there, in redirect uri of the app or in the code (assuming it must be the same) I've tried making a callback.html myself, but it doesnt work. I'm starting to think it must be an online link. But i'm only working on localhost..

我已经找到了一个非常类似的问题在这里:
<一href=\"http://stackoverflow.com/questions/13334361/redirect-uri-and-how-to-host-callback-html-on-soundcloud\">redirect_uri以及如何在主机的SoundCloud callback.html?

I've found a very similar question here: redirect_uri and how to host callback.html on SoundCloud?

但它不解决我的问题。

我意识到这是很基本的东西,但我希望我能得到一些明确的帮助。
非常感谢你。

I realize this is very basic stuff, but i hope i can get some clear help. thank you very much

编辑:进行测试,我已经把 http://www.samplewars.com/ 在应用注册REDIRECT_URI和在REDIRECT_URI在我的code,现在我得到的弹出窗口,询问了存取权限的帐户的SoundCloud,点击连接它去samplewars.com后。我如何让它去同一个页面,(本地主机URL)。其实是可以把一个离线链接那里,我只在本地主机上的工作?我不在线有什么。

EDIT : for testing, i've put http://www.samplewars.com/ in the app registration redirect_uri and in the redirect_uri in my code, and now i get the pop-up asking for acces to the soundcloud account, after clicking connect it goes to samplewars.com. How do i make it go to the same page, (localhost url). Is actually possible to put an offline link there, as i'm only working on localhost? i dont have anything online.

推荐答案

回调文件用于身份验证令牌发送回应用程序。你的情况应该是这样的 http://www.samplewars.com/soundcloud-callback.html 。对于开发,你可以注册不同的应用程序,它指向你的本地设置(例如: HTTP://localhost/soundcloud-callback.html 或其他)

The callback file is used to send the authentication token back to your application. In your case it should be something like http://www.samplewars.com/soundcloud-callback.html. For development, you could register a different application which points to your local setup (eg http://localhost/soundcloud-callback.html or whatever).

如果您使用的SoundCloud的Javascript API,这是相当简单的。有一个在文档。

If you use the SoundCloud Javascript API, this is fairly simple. There's an example page in the documentation.

这篇关于如何进行身份验证与REDIRECT_URI(callback.html)的SoundCloud API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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