This Question is Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
11 Replies Last post: Feb 19, 2010 8:12 AM by Sebastian König  
Sebastian König Newbie 9 posts since
Jun 23, 2009
Currently Being Moderated

Oct 8, 2009 4:58 AM

Does accessing the API from Flash/AIR need crossdomain.xml on server?

Hi,

 

I just had a discussion with a developer who currently works on a flash application which uses the API to pull data in.

It works fine in the developer verions, but does not get any data in a normal player. Due to the developer this is caused by the missing crossdomain.xml on the ws.webtrends.com server. Does anyone have the same experience and ideally a solution?

 

@Webtrends: Can you please verify that and place a crossdomain.xml on your server?

Eric Butler Novice 58 posts since
Nov 12, 2008
Currently Being Moderated
Oct 8, 2009 11:46 AM in response to: Sebastian König
Re: Does accessing the API from Flash/AIR need crossdomain.xml on server?
Thanks for the note Sebastian.  We'll look into this.
Eric Butler Novice 58 posts since
Nov 12, 2008
Currently Being Moderated
Oct 13, 2009 3:20 PM in response to: Sebastian König
Re: Does accessing the API from Flash/AIR need crossdomain.xml on server?
Hi Sebastian, it was good to see you here in London today.  We've deployed this update into our production environment as of this afternoon GMT.  Let us know if it's working as you expect.
Eric Butler Novice 58 posts since
Nov 12, 2008
Currently Being Moderated
Oct 28, 2009 10:35 AM in response to: Sebastian König
Re: Does accessing the API from Flash/AIR need crossdomain.xml on server?

Hi Sebastian, sorry for the delay here.  We had deployed the xml file to each path, but hadn't deployed it to the root directory.  This has now been done, so you can now access the crossdomain.xml directly via the root (eg, http://ws.webtrends.com/crossdomain.xml).

 

Thanks for your patience, and let us know if there's anything else you need.

Douglas Karr Newbie 3 posts since
Aug 5, 2009
Currently Being Moderated
Jan 14, 2010 9:43 AM in response to: Sebastian König
Re: Does accessing the API from Flash/AIR need crossdomain.xml on server?

An easier resolution to this is for the client to put a proxy page and crossdomain.xml on their server.  In other words - just a simple relay page that will push the api call and get the response.  As well, this is a best security practice since you don't want to embed credentials within a flash or AIR file - which are easily hacked.

 

So - build a proxy page that holds your credentials and passes the data. Put up a crossdomain.xml file on your server. Then point your flash file to the proxy page on your own server.  A proxy page is simple to build, just grab the post and then send the API call and echo the response.  If you do want to save credentials in flash or AIR, use some kind of encrypted key that your proxy page will authenticate.

 

I would not advise Webtrends to put a crossdomain.xml file on their site since this would enable anyone to distribute a flash file with credentials in it.  It's a security risk waiting to happen.

Douglas Karr Newbie 3 posts since
Aug 5, 2009
Currently Being Moderated
Feb 18, 2010 9:01 AM in response to: Sebastian König
Re: Does accessing the API from Flash/AIR need crossdomain.xml on server?

Hi Sebastian,

 

It would depend what language you're programming in.  I'm often working in PHP, so I build a proxy.php file on the server where the Flash app is loading from.  I post the API request from the flash file to the proxy page without credentials.  The proxy page adds the user credentials and passes the request to the API.  The response is simply echo'd back by the proxy.php page.  If you're working in PHP, I've attached a PHP file that would work - you just need to pass the Webtrends API request URL to it.

 

Cheers!

Doug

Attachments:

More Like This

  • Retrieving data ...