Now I'm getting the following msg:
"InvalidTokenError"
Do I need a different token to use the write API?
This token has been working fine with the read API.
--- In brightcove-dev@yahoogroups.com, "Joel Fiser" <jfiser42@...> wrote:
>
> Is this documented at all? Can you please provide a man page or a real
> example that works using AS3?
>
>
> --- In brightcove-dev@yahoogroups.com, Brian Deitte <bdeitte@> wrote:
> >
> > Here's some more info on this.
> >
> > I don't know if AS has a built-in way to do JSON-RPC or not, but
> basically the post body needs to look like this:
> > {"method" : "delete_video",
> > "params" : {"token" : "myValidSecretToken",
> > "video_id" : 17035,
> > "cascade" : true}}
> >
> >
> > ________________________________
> > From: brightcove-dev@yahoogroups.com
> [mailto:brightcove-dev@yahoogroups.com] On Behalf Of Brian Deitte
> > Sent: Tuesday, January 06, 2009 2:56 PM
> > To: brightcove-dev@yahoogroups.com
> > Subject: RE: [brightcove-dev] Re: Trying to delete videos - I'm
> getting: "error": "UNKNOWN_METHOD","code":301
> >
> >
> > Hi Joel, I asked someone else here about it, and this was the
response:
> >
> > The error they are getting is because they are passing each
> parameter seperatly. I think it would work if they only pass one url
> variable named json with the json-rpc object as the value.
> >
> > ________________________________
> > From: brightcove-dev@yahoogroups.com
> [mailto:brightcove-dev@yahoogroups.com] On Behalf Of Joel Fiser
> > Sent: Wednesday, December 31, 2008 12:59 PM
> > To: brightcove-dev@yahoogroups.com
> > Subject: [brightcove-dev] Re: Trying to delete videos - I'm getting:
> "error": "UNKNOWN_METHOD","code":301
> >
> >
> > OK - I wasn't using POST before - but now I am.
> > Here's the func:
> >
> > private function delClip(myClipObj:Object){
> > var loader:URLLoader;
> > var url:String = "http://api.brightcove.com/services/post"
> > var myRequest:URLRequest = new URLRequest(url);
> >
> > var myVars:URLVariables = new URLVariables();
> > myVars.command = "delete_video";
> > myVars.video_id = myClipObj.id;
> > myVars.cascade = 1;
> > myVars.token = "myValidSecretToken";
> > myRequest.data = myVars;
> > myRequest.method = URLRequestMethod.POST;
> >
> > try { &nbs p ;
> > navigateToURL(myRequest); // I also tried sendToUrl and
> using a Loader
> > }
> > catch (err:Error) {
> > view.displayTxt("dumpTxt", err.message, null);
> > }
> > }
> >
> >
> > Now I get the following error message:
> >
> > {"error": {"name":"MissingJSONError","message":"Could not find
> JSON-RPC.","code":211}, "result": null, "id": null}
> >
> >
> >
> > --- In brightcove-dev@yahoogroups.com, "Joel Fiser" <jfiser42@> wrote:
> > >
> > > Here's the string I'm pasting directly into the browser. Of course I
> > > don't include my actual token below.
> > >
> > >
>
http://api.brightcove.com/services/library?command=delete_video&video_id=1692732\
3&cascade=true&token=myValidSecretToken
> > >
> >
>