Is the 'https://api.del.icio.us/v1/*' API still active? - delicious-api

So url tagging website is back running on it's original URL of del.icio.us . I have a java client which attempts to call the original REST API via the URL in the title but all calls fail. I'm wondering can someone confirm what the correct API URL now is, if any. Documentation seems scarce.

Related

Trying to return a Twilio call to a Studio Flow

There's a lot going on, but I think I've narrowed it down to something simple. I hope someone can provide any kind of guidance as to what in the world I'm doing wrong.
I've got javascript voice (2.0) working with node.js. I can call inbound and outbound, and I can send a call from a studio flow to a javascript client. This all works. The issue is that when a javascript client user presses "reject" (out of the box example code) or the call isn't answered, it's just dropped. It doesn't return to the studio flow, and I suppose it isn't designed to.
To fix this, I am trying to get the call using the example for client.calls(call sid).update, and I can take the call and issue Say commands and play mp3 files as shown in the example. But when I try to return the call to the studio flow using the webhook url (with or without ?FlowEvent=return appended) it fails. I've tried using the twiml: syntax and providing valid twiml, and I've tried using the url: syntax and providing a url that produces valid redirect twiml (using the echo twimlet).
The URL I'm using is https://webhooks.twilio.com/v1/Accounts/{my_account_sid_here}/Flows/{valid_flow_sid_here}?FlowEvent=return (with and without ?FlowEvent=return at the end)
twiml like this;
<Response><Redirect method="POST">https://webhooks.twilio.com/v1/Accounts/{my_account_sid_here}/Flows/{valid_flow_sid_here}?FlowEvent=return</Redirect></Response> (with and without ?FlowEvent=return at the end)
I'm using the Parent Call Sid (the call sid for the stream never does anything so I assume that isn't the one to use) and the call, when updated, results in a voice message that says "We're sorry, an application error has occurred." I don't know if that is coming from studio or the twilio call processor. If I use the example url with the rick roll mp3 it works.
I've checked the debug messages and they seem to indicate that the flow webhook URL is returning a 400 status code. The documentation says to "To retrieve the Studio Webhook URL in your Studio flow, click the red Trigger widget. The URL starting with https://webhooks.twilio.com/v1/... is the Webhook URL for this Flow" and that's where I got the URL which includes the account sid and flow sid, which I've also checked for correctness.
I'm not sure what to try next.

Enable User Session In Strapi

I want to enable session for every user who requests for the token using the URL "/auth/local" which is the default API provided by Strapi. I guess Strapi is by default configured with Koa session but inspite of that no session cookie is returned in response by default.
What is the best way to enable session management in Strapi? Can anyone share their experience on this one ?
Why do not you try using the mechanism of sessionStrage.
I referred to this page of the official reference.
(I used non-react part because I do not use it)
Plugin Development - Front-end Helpers - Auth
https://strapi.io/documentation/plugin-development/utils.html#auth
github
https://github.com/strapi/strapi-examples/tree/master/login-react/react-login-front-end-app
blog?
https://medium.com/strapi/protected-routes-and-authentication-with-react-and-node-js-d31d234644cd
The source of auth.js is pretty helpful
https://github.com/strapi/strapi-examples/blob/master/login-react/react-login-front-end-app/app/utils/auth.js
I POST from the request module and returned to json
auth.setToken (body.jwt, body.rememberMe)
auth.setUserInfo (body.user, body.rememberMe)
Then we kept the data in sessionStrage.
I do not know if it will be helpful, but maybe it may be useful, so I wrote it.
I am a Japanese who is not good at English, so I'm going to google translate as it is.
Even if there is a strange part, I do not know, so please forgive that point.

Twitter api request

I have read the documentation of twitter , and created an app and have all the keys needed .
Now i am trying to understand that simple one line http request ,to get a user latest twits .
I have read this Simplest PHP example for retrieving user_timeline with Twitter API version 1.1
but there is not one line code in there to make the request ( i don't know java script).
so , i have this :
https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=twitterapi&count=2
Which will not work because my keys should be in this line, but i don't understand how to add them?? where and how i add my keys to this ?
This url is like a node or address so twitter server knows what kind of request you need.
https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=twitterapi&count=2
Beside url you can pass many other parameter using http header, which is best to be used with server langunge programming, e.g PHP.
In PHP you can pass your credentials by changing header. While current twitter API are using Oauth, it's going to difficult to learn using Oauth this way, the easiest option is to use others' library. Check out 'twitter API library' (just google it)

get referring url from my rest api

I am building a rest api in mvc. When consuming the API, I need to be able to get the referring URL that is calling the service. I have tried Request.UrlReferer and it comes back null. How can I get the url that is consuming the service?
Are you sure you don't mean in the consumer you need to know the referer of the client making the REST call?
If this is the case what you need to do is look at the request header and extract from it the Referer.

How to I access a SoundCloud public stream?

How do I play a track from a SoundCloud URL, which, for example, I got from the xml response from a query
<stream-url>https://api.soundcloud.com/tracks/31164607/stream</stream-url>
I should have thought that it would have been as easy as:
https://api.soundcloud.com/tracks/31164607/stream&client_id=my_client_id
yet I get
<error>401 - Unauthorized</error>
All I want to do is consume it in a Silverlight MediaElement, so all I need is set some url to the MediaElement's Source property.
I've checked an application that I wrote about 2 years ago, and THEN, accessing the stream url was as easy as this for a public track:
http://api.soundcloud.com/tracks/18163056/stream&consumer_key=MY_CONSUMER_KEY
however this no longer seems to work.
For example, all I had to do then in C# was:
MediaElement me = new MediaElement();
me.Source= new Url("http://api.soundcloud.com/tracks/18163056/stream&consumer_key=MY_CONSUMER_KEY");
me.Play();
Any hints would be appreciated.
I had a reply on a Microsoft forum that seems to imply that SoundCloud might not be possible to stream to Windows 8 Metro devices without consuming the whole stream before playback starts - which is quite worrying and would seem to imply that to make authentication possible, it would have to be done entirely in the url querystring insterad of using the header:
(The following reply is the answer to the following question: 'I am able to access an audio stream by http using the MediaElement, however I need to access it via https in which I need to add the oAuth info to the header of the initial request.
How is this done when using a MediaElement, and if it cannot be done, what is the workaround for consuming an audio feed in Metro 8 that requires header authentication to stream?')
"Direct access to the underlying network stream is not currently permitted by the MediaElement. Because of this there is currently no way to modify the header of the HTTP request to include any additional authentication information. That said, you do have control over the URL. You could theoretically setup an HTTP proxy service that translated the HTTP GET request parameters into the necessary oAuth credentials. Keep in mind that this is just a theoretical workaround. You may find different behavior in practice. Another theoretical workaround would be to handle the oAuth yourself via a raw stream socket and pass the retuned media data to the MediaElement via "Set Source" and a "Random Access Stream". Please keep in mind that this method has major limitations. in order to use a "Random Access Stream" with the ME you need to make sure all of the data is available before passing it to the ME."
The proxy service is not scalable for an application that is merely distributed for free as every stream would need to come via the proxy. And the raw stream socket, although getting around this, would mean that playback could not start until the whole file had downloaded - and this goes against all current UX (User Experience) guidelines.
So once again, if anyone has any tips, or info about how the whole authentication thing can be achieved in a querystring instead of using headers, I'd appreciate it!
I'm a little confused about whether you're referring to a public or a private track? If it's a public track, then you shouldn't need to send any authentication information, just your client id.
When I request https://api.soundcloud.com/tracks/31164607/stream?client_id=YOUR_CLIENT_ID then I get a 302 redirect to the proper mp3 stream.
Remember, adding parameters to a URL must start with a ? not &. This could (more than likely) be the reason why you are getting a 401 (SC is not picking up the client_id).
After authentication the link like this
http://api.soundcloud.com/tracks/103229681/stream?consumer_key=d61f17a08f86bfb1dea28539908bc9bf
is working fine. I am using Action Script.
I'm following up on Tom's reply because he calls attention to url character specificity. My HTTP requests randomly started failing today, and I was prefacing my client_Id with a ?. As soon as I changed that single ? to &, it started working. So in my case, SC wasn't picking up my client_Id because I used the wrong character. I think depending on where in the request we're talking about specifically, it's worth noting that differences between ? and & do make a difference.

Resources