This article presents a ready-to-use script (written in PHP) that can be used to easily transfer domains from your TransIP account to your Openprovider account.
As you are a TransIP customer and we are Openprovider and not TransIP, you will be much more experienced with TransIP than we are. From your experience, feel free to add a comment to this article with your feedback, tips or tricks! Of course, you can send an e-mail as well.
Important disclaimer: this script is created as a courtesy to our customers. Running it is completely on your own responsibility. We strongly advise to run the script in test mode first, before actually ordering the domain transfers. Openprovider is not responsible for any unforeseen situation that is the result of running this script.
Download and install the TransIP API
If you already use the TransIP API, you can probably skip most instructions in this section.
If you do not already use the TransIP API, please follow the next steps:
- Enable API access
- Log in to your TransIP control panel
- Navigate to Config > My account > API
- Enable API access with the slider under "API settings"
- Optionally (recommended from security perspective), add your IP address to the IP whitelist
- Under "Key pairs", create a new key pair by typing a label and clicking the "Add key pair" button; optionally tick the "Whitelisted IP" checkbox
- The private key will be shown on your screen; copy this private key as you cannot retrieve it again at a later moment
- Download and configure the API
- Download the API source from the TransIP website and extract the file
- Open the file TransIP/ApiSettings.php
- Write your TransIP username in the $login variable
- Paste the private key from above in the $privateKey variable
After having finished those steps, you're ready to use the TransIP API and prepare and run the transfer script.
Download and install the Openprovider API
If you already use the Openprovider API, you can probably skip most instructions in this section.
If you do not already use the Openprovider API, please follow the next steps:
- Enable API access
- Log in to your Openprovider control panel
- Navigate to the menu Account
- Click the "Add contact person" button
- Define the new user, ensure that you set the type to "technical" and enable API access
- Add your IP address to the IP whitelist by clicking the "Edit" button under the "API access restrictions" section.
- Click the link in the e-mail that you received and set your password
- After setting the password, a hash value will be shown; copy this value as you cannot retrieve it again at a later moment
- Download API
- Download the API.php file from the Openprovider API documentation
- In this article, I assume that the API.php file is stored in the same directory as the transfer-from-transip.php script
Prepare and run the transfer script
Download and customise
- Download the script that is attached to this article.
The script is prepared to be run in the root directory of the TransIP API source code that you just downloaded (e.g. ~/Downloads/transapi_transip.nl_v5_9/), but you can place it at any other location - just be sure to update the paths to the includes in the script.
- Open the script and populate the $op_user and $op_hash variables with the Openprovider API credentials.
Define domain list
Create a file in which you put each domain to transfer on a separate line. IDNs must be written in punycode, so domain.онлайн must be written as domain.xn--80asehdb.
Run the script
The script accepts the following parameters:
- -f (required): this is the file name that contains the domain list
- -t: "test mode", can be "0" or "1". If test mode is enabled (default value), the script will behave as "read only" and output data, but it will not create DNS zones, unlock domains or transfer domains
- -d: whether or not to copy the DNS zones. Allowed values:
- 0: do not import DNS zones (default value)
- 1: import DNS zones if no zone already exists
- overwrite: import DNS zones; if a zone already exists, delete it first
- -h: can be "0" or "1", and defines whether or not to force creation of new handles for every contact. If set to "0" (default value), the script will check the data of a handle; if an Openprovider handle already exists with the same data, this existing handle is used instead of creating a new one.
- -v: "verbose mode", can be "0" (default value) or "1", and defines whether or not to output debug and other information.
- --help: send "transfer-from-transip.php --help" for command line information about the usage of the script.
By running the script, the following steps will be performed for each domain in the domain list:
- Retrieve the domain details from TransIP
- If required, import the DNS zone
- Create the contacts in Openprovider
- If required, retrieve the authorisation code
- If required, unlock the domain
- Order the transfer in Openprovider
From here on, the normal transfer process commences. Some extensions will be transferred instantly (e.g. .nl), some extensions will send an e-mail to the domain holder (e.g. .fr), some extensions will start a transfer period (e.g. .com).
The script is pretty simple: it just reads contact and nameserver information and the authorisation code, unlocks the domain and initiates the transfer. This should be fine for most extensions, but some cases are not supported because of this simplicity:
- Additional data: as soon as additional information or actions are required, the transfer is not supported and should be initiated manually.
- Authcode not retrievable: if a domain requires an authorisation code that is sent to the registrant only (for example .be, .pt or .ro), the domain cannot be transferred with this script.
Notes on a couple of specific TLDs:
- .eu: before running the script, request the authcode through the TransIP web panel (feel free to place a comment with a TransIP API example how to retrieve .eu authcodes)
- .de: if the trustee service is turned on, TransIP will not provide the authcode. Deactivate TransIP's trustee service before running the script.
- .fr: if the trustee service is turned on, TransIP will not provide the authcode. Deactivate TransIP's trustee service before running the script.
- .uk: the script will request the transfer, but the IPS tag for the domain must be changed to REGISTRAR-EU by TransIP. Contact TransIP support to do this.