Returns the agent’s unique URL
Agent
String — the agent’s full URL
Each agent is accessed remotely through a unique URL, generated when a specific agent’s device is authorized to access the Electric Imp impCloud™. This method informs the agent of its own URL. As such, it provides a way for an agent to pass its URL on to a third-party website or a mobile app, or to add it into an agent-served user interface — as shown in this sample code.
See the documentation for the http object method http.onrequest() to learn how an agent can handle HTTP requests made to this URL.