• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

Tunnelbroker.net API Documentation

Started by kcochran, April 17, 2014, 07:16:49 AM

Previous topic - Next topic

kcochran

API Parameters

  • USERNAME: The account username
  • USERID: The account User ID
  • PASSWORD: The account password
  • MD5PASS: The MD5 hash of the account password
  • UPDATEKEY: Usage key as defined on the tunnel's Advanced tab
  • IPADDRESS: Client Endpoint IPv4 address
  • TUNNELID: Tunnel id #
 
  IMPORTANT: For API calls which operate on a single tunnel, if an Update Key is set for that specific tunnel, it must be used instead of the account password or password MD5 hash.
 
  Many embeded systems (routers, WiFi access-points, etc.) use the historic update API, and will often MD5 the password set prior to sending the update.  In this case, you will need to remove the Update Key set for the tunnel, and use your account password directly.

Tunnel Information API
  https://USERNAME:PASSWORD@tunnelbroker.net/tunnelInfo.php
  Returns an XML structure with all of your tunnels' configuration settings.  See https://forums.he.net/index.php?topic=3109.0 for structure details.

  https://USERNAME:PASSWORD@tunnelbroker.net/tunnelInfo.php?tid=TUNNELID
  Returns an XML structure with this specific tunnel's configuration settings.
 
Tunnel Client Endpoint Update APIs

NOTE: Please only trigger an update when your IP address changes!

https://ipv4.tunnelbroker.net/nic/update (Preferred)
   The following scripts conform to the Dyn DNS Update API (as documented at http://dyn.com/support/developers/api/).  We only support HTTPS updates.
   
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/nic/update?hostname=TUNNELID&myip=IPADDRESS
https://ipv4.tunnelbroker.net/nic/update?username=USERNAME&password=PASSWORD&hostname=TUNNELID&myip=IPADDRESS

   Update the listed tunnel's client endpoint to the specified IP.
   
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/nic/update?hostname=TUNNELID
https://ipv4.tunnelbroker.net/nic/update?username=USERNAME&password=PASSWORD&hostname=TUNNELID

   Update the listed tunnel's client endpoint to the IP address making the update request.


https://ipv4.tunnelbroker.net/ipv4_end.php (Deprecated)
   The following scripts return either +OK or -ERROR followed by a descriptive message.
   
http://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID
   (Not recommended)

https://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID&ip=IPADDRESS

   Update the listed tunnel's client endpoint to the specified IP.

https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID
   Update the listed tunnel's client endpoint to the IP address making the update request.

mathivanan


Based on the below information ,I have been using the below command for IP update using API:

wget --no-check-certificate -T10 -a - "https://ipv4.tunnelbroker.net/nic/update?username=${TUNNEL_USER_NAME}&password=${TUNNEL_UPDATE_KEY}&hostname=${TUNNEL_UNIQUE_ID}&myip=${CURRENT_EXTERNAL_IP}"


I t was working well for the past 6 months.Recently it has been failing to update the Tunnelbroker website with the new IP address.I checked the return status of the above command; and it is a success. I suspect a problem with tunnelbroker website. Please suggest if it the reason or help me by pointing in the right direction.

Thank you


Quote from: kcochran on April 17, 2014, 07:16:49 AM
API Parameters

  • USERNAME: The account username
  • USERID: The account User ID
  • PASSWORD: The account password
  • MD5PASS: The MD5 hash of the account password
  • UPDATEKEY: Usage key as defined on the tunnel's Advanced tab
  • IPADDRESS: Client Endpoint IPv4 address
  • TUNNELID: Tunnel id #
 
  IMPORTANT: For API calls which operate on a single tunnel, if an Update Key is set for that specific tunnel, it must be used instead of the account password or password MD5 hash.
 
  Many embeded systems (routers, WiFi access-points, etc.) use the historic update API, and will often MD5 the password set prior to sending the update.  In this case, you will need to remove the Update Key set for the tunnel, and use your account password directly.

Tunnel Information API
  https://USERNAME:PASSWORD@tunnelbroker.net/tunnelInfo.php
  Returns an XML structure with all of your tunnels' configuration settings.  See https://forums.he.net/index.php?topic=3109.0 for structure details.

  https://USERNAME:PASSWORD@tunnelbroker.net/tunnelInfo.php?tid=TUNNELID
  Returns an XML structure with this specific tunnel's configuration settings.
 
Tunnel Client Endpoint Update APIs

NOTE: Please only trigger an update when your IP address changes!

https://ipv4.tunnelbroker.net/nic/update (Preferred)
   The following scripts conform to the Dyn DNS Update API (as documented at http://dyn.com/support/developers/api/).  We only support HTTPS updates.
   
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/nic/update?hostname=TUNNELID&myip=IPADDRESS
https://ipv4.tunnelbroker.net/nic/update?username=USERNAME&password=PASSWORD&hostname=TUNNELID&myip=IPADDRESS

   Update the listed tunnel's client endpoint to the specified IP.
   
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/nic/update?hostname=TUNNELID
https://ipv4.tunnelbroker.net/nic/update?username=USERNAME&password=PASSWORD&hostname=TUNNELID

   Update the listed tunnel's client endpoint to the IP address making the update request.


https://ipv4.tunnelbroker.net/ipv4_end.php (Deprecated)
   The following scripts return either +OK or -ERROR followed by a descriptive message.
   
http://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID
   (Not recommended)

https://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID
https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID&ip=IPADDRESS

   Update the listed tunnel's client endpoint to the specified IP.

https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/ipv4_end.php?tid=TUNNELID
   Update the listed tunnel's client endpoint to the IP address making the update request.

AndrewButterworth

I have been using the HTTP method to update my tunnel endpoint IPv4 address for a while now (http://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID) along with the 'ip=AUTO' variable.  This has now stopped working and I get an error of 'INVALID IPV4 ADDRESS' - I assume because the HTTP method has now been depreciated in favour of the HTTPS method.
If I use the preferred HTTPS method via a browser (https://ipv4.tunnelbroker.net/nic/update?username=USERNAME&password=PASSWORD&hostname=TUNNELID), this works fine, however I am automating this on a Cisco IOS router with a TCL script (ipv6-tunnel-update.tcl) triggered by the interface going up.  I have modified the script to use the new API parameters but it appears the TCL script doesn't support HTTPS so it doesn't work.
Has anyone else hit this issue and has a workaround?

Thanks, Andy

kcochran


AndrewButterworth

#4
Quote from: kcochran on September 19, 2015, 11:16:04 PM
Bug in the script.  Should be better.

OK, I have changed the EEM TCL script back to the original (http://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID) and I am now getting '-ERROR: Invalid API key or password'?

EDIT:  Sorry, my bad I changed the password as it had '$' in it that the EEM script was interpreting...    Just re-MD5 hashed the new password and its working again now using the original HTTP method.

Thanks, Andy

Delotd89

Quote from: AndrewButterworth on September 20, 2015, 02:06:46 AM
Quote from: kcochran on September 19, 2015, 11:16:04 PM
Bug in the script.  Should be better.

OK, I have changed the EEM TCL script back to the original (http://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPADDRESS&pass=MD5PASS&user_id=USERID&tid=TUNNELID) and I am now getting '-ERROR: Invalid API key or password'?

EDIT:  Sorry, my bad I changed the password as it had '$' in it that the EEM script was interpreting...    Just re-MD5 hashed the new password and its working again now using the original HTTP method.

Thanks, Andy

snarked

Note:  Internet Explorer ("exploder") does not understand URLs with an embedded ID/PW.  However, the parameter version ("?username=...&password=...") does work with IE 11.