2017-01-11 13:02:45 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								---
							 
						 
					
						
							
								
									
										
										
										
											2017-10-11 08:33:17 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								name: Name.com
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								title: Name.com Provider
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 13:02:45 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								layout: default
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								jsId: NAMEDOTCOM
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Name.com Provider
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Configuration
 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-11 13:12:41 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								In your credentials file you must provide your name.com api username and access token:
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 13:02:45 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{% highlight json %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  "name.com":{
							 
						 
					
						
							
								
									
										
										
										
											2017-10-11 13:12:41 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    "apikey": "yourApiKeyFromName.com",
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 13:02:45 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    "apiuser": "yourUsername"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{% endhighlight %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-10-11 13:12:41 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								There is another key name `apiurl`  but it is optional and defaults to the correct value. If you want to use the test environment ("OT&E"), then add this:
							 
						 
					
						
							
								
									
										
										
										
											2017-07-13 11:52:56 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "apiurl": "https://api.dev.name.com",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-12-18 15:26:26 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								export NAMEDOTCOM_URL='api.name.com'
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 13:02:45 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								## Metadata
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								This provider does not recognize any special metadata fields unique to name.com.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Usage
 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-11 13:12:41 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								**Example Javascript (DNS hosted with name.com):**
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 13:02:45 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{% highlight js %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								var REG_NAMECOM = NewRegistrar("name.com","NAMEDOTCOM");
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								var NAMECOM = NewDnsProvider("name.com","NAMEDOTCOM");
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								D("example.tld", REG_NAMECOM, DnsProvider(NAMECOM),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    A("test","1.2.3.4")
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{%endhighlight%}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-10-11 13:12:41 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								**Example Javascript (Registrar only. DNS hosted elsewhere):**
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 13:02:45 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{% highlight js %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								var REG_NAMECOM = NewRegistrar("name.com","NAMEDOTCOM");
							 
						 
					
						
							
								
									
										
										
										
											2017-05-31 13:12:40 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								var R53 = NewDnsProvider("r53", "ROUTE53");
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 13:02:45 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								D("example.tld", REG_NAMECOM, DnsProvider(R53),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    A("test","1.2.3.4")
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{%endhighlight%}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{% include alert.html text="Note: name.com does not allow control over the NS records of your zones via the api. It is not recommended to use name.com's dns provider unless it is your only dns host." %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Activation
 
							 
						 
					
						
							
								
									
										
										
										
											2018-12-18 15:26:26 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								In order to activate API functionality on your Name.com account, you must apply to the API program. The application form is [located here ](https://www.name.com/reseller/apply ). It usually takes a few days to get a response. After you are accepted, you should receive your API token via email.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 11:09:38 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Tips and error messages
 
							 
						 
					
						
							
								
									
										
										
										
											2018-12-18 15:26:26 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 09:41:31 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### invalid character '<'
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-12-18 15:26:26 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								integration_test.go:140: api returned unexpected response: invalid character '<' looking for beginning of value
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 11:09:38 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								This error means an invalid URL is being used to reach the API
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 11:21:27 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endpoint.  It usually means a setting is `api.name.com/api`  when
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								`api.name.com`  is correct (i.e. remove the `/api` ).
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 11:09:38 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								In integration tests:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  Wrong: `export NAMEDOTCOM_URL='api.name.com/api'` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  Right: `export NAMEDOTCOM_URL='api.name.com'` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								In production, the `apiurl`  setting in creds.json is wrong. You can
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								simply leave this option out and use the default, which is correct.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 09:41:31 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								TODO(tlim): Improve the error message. (Volunteer needed!)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-12-18 15:26:26 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 09:41:31 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### dial tcp: lookup https: no such host
 
							 
						 
					
						
							
								
									
										
										
										
											2018-12-18 15:26:26 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								integration_test.go:81: Failed getting nameservers Get https://https//api.name.com/api/v4/domains/stackosphere.com?: dial tcp: lookup https: no such host
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2018-12-18 17:45:31 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 11:09:38 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								When running integration tests, this error
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								means you included the `https://`  in the `NAMEDOTCOM_URL`  variable.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								You meant to do something like `export NAMEDOTCOM_URL='api.name.com' instead.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								In production, the `apiurl`  setting in creds.json needs to be
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								adjusted. You can simply leave this option out and use the default,
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 11:21:27 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								which is correct. If you are using the EO&T system, leave the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								protocol (`http://` ) off the URL.