Dave E
Posts: 0
Joined: Sat Mar 30, 2013 12:13 am

Dynamic Application Key and REST-API key?

Is it possible to set a service Application Key and REST-API key dynamically with code?

My goal is to enable my Tiggzi app to be configurable at runtime, to be able to POST jason data to a service whose Application Key and REST-API key is specified at runtime. Any advice or examples would be much appreciated!

Thanks,

Dave

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Dynamic Application Key and REST-API key?

You could prompt the user to enter the key in the first page. Save the key into local storage. Map the key from local storage to service.

Dave E
Posts: 0
Joined: Sat Mar 30, 2013 12:13 am

Dynamic Application Key and REST-API key?

Thanks Max!

Dave E
Posts: 0
Joined: Sat Mar 30, 2013 12:13 am

Dynamic Application Key and REST-API key?

I've saved the keys into local storage and assigned mapping, but it doesn't seem to be calling the service appropriately. I've attached a screenshot of the mapping. Do I need to add any javascript to explicitly copy the local storage vars into the service values? (I've verified that the values of my local storage vars are correct at runtime.) Any help is most appreciated.

Thanks,

Dave

Image

Dave E
Posts: 0
Joined: Sat Mar 30, 2013 12:13 am

Dynamic Application Key and REST-API key?

To be more specific, it isn't calling the service at all.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Dynamic Application Key and REST-API key?

Check with Chrome Dev. Tools if you are getting any errors. You can also place a console.log (...) in mapping to see if you actually get values from local storage.

Return to “Issues”