Creating a server in the agent box

We can create a server part for imp by programming it in agent box,but the thing is,it uses only electric imp’s website as a part of its server like this " https://agent.electricimp.com/oJYFE65Vx2xHw",my doubt is :

  1. Is this one secured ? or is there any codes to secure this link ? because if i use this for security purpose i need to secure it or else it can be used by anyone else.
    2.Can we create agent part in any other servers like the way we do it in WAMP server ? Can we program in wamp or Lamp to make an agent and control the imp?
    Never mind my english if it is wrong :stuck_out_tongue:

Certainly you can create your own web page and host it. On your own server you can handle security. You should take steps to not share the agent URL in that page. I use localstorage for that. When I first go to my web page for a new device I have to enter the agent unique url into that interface. I got that ides from another forum member.

Another thought… though I have not done it is that you can add a query string to the imp agent and use code in the agent to reject requests that do not have that specific string.

so far as I know (I am absolutely not an expert) there is not a way to block the request if someone happens to find out your url.

I don’t exactly know what wamp or Lamp is. Perhaps there is another person out there who knows this?

I’m not sure what the question is (sorry).

To keep the Imp “id” or URL secret, I use PHP CURL to POST all data to the agent. From a website (web page) point of view, nobody can see the ID. The Imp URL never shows up in any HTML or javascript source. Likewise, a PHP SESSION can be used to require a log-in before any PHP scripts are allowed to POST to the agent.

Though having imp-cloud serve the pages is cool, it is better to buy and run your own website and domain that way you give a professional look and can take advantage of all the great tools (and ready made code) out there for build a great looking web-app.

An end-user shouldn’t see the URL at all really, the page should load from a simple professional looking address at the very least the page should call the imp cloud direct, or better your server should do it.

For example of code to make your front-end look neat look for ready-made javascript libraries such as angular.js

Jargon buster

  • LAMP - Linux, Apache, MySQL, Php - the combination of free software a lot of websites run on (WAMP is just the less popular Windows equivalent)

mjkuwp94 , mlseim , back_ache Thankyou guys :slight_smile: i wil try it