Best Practice: How to share External URL with 3rd pary server?

What is the best way to share the External URL of an agent with a non-imp server during an agent

The method I’ve come up with is to set the HTTP referer header field but as of right now I must copy/paste and hard code the external URL into the agent code. Will there be an API call to grab this value?

I second the request for an API call to get the URL

me too!

I just discovered that the BlinkUp integration process generates something called a setup token which has the device ID and the Imp card ID in it. If I understand this correctly, you can then pass this token to your server application and use it to make requests to the external URL of the imps agent, as the URL is constructed using the device ID.

Pretty cool huh :slight_smile:

I knew this was the case but I haven’t seen this process documented anywhere… Is it available at this point in time?

I guess Hugo and the guys can confirm this, but as I understand it, the setup token is generated by the BlinkUp mobile framework/sdk and in order to be able to use this framework you need an API key which you only get if you have a service agreement in place with Electric Imp.

Personally, I think this is a really great solution for associating hundreds/thousands/millions of imp devices with users but for prototyping I’m hoping there will be some way of using a dev API key that limits the token generation to a finite amount of dev imps.

@Hugo - can you confirm any of this?

The token you pass into the blinkup lib gets passed through (and currently is sent in the webhook) but does not affect the agent URL.

The intention for this is to allow a vendor to easily associate a user in their own domain (eg their own username world) with a specific imp device.

We’re adding an agent API to get the agent URL shortly.

@Hugo - ahh cool, thanks for clarifying!