Knowledge Base

Check for answers to your questions by searching by keywords, or check categories below.

15 Domains API: How to request or reset an authcode

This is a series of articles dedicated to demonstrating how to get acquainted with Openprovider Domains API methods.

This is a second article in a series in which we are going to cover outgoing domain transfer. To get more information about our API in general, please use our documentation portal as your reference.

Domain transfer is a procedure of changing the current registrar of a domain name. Domain names may be transferred only if they have been registered with the previous registrar for 60 days or more.

To transfer a domain out of Openprovider one should submit a transfer request with a new registrar. You should follow their instructions on the specifics of the process.

The following requirements should be met before initiating the transfer:

  • for gTLD domains the domain is more than 30 days old;
  • for gTLD domains the domain was not transferred between registrars within the last 60 days;
  • the domain is "Unlocked" for transfer.

You can disable Registrar Lock by utilising modifyDomainRequest method. Yet in this article we are going to focus oh how to request or reset an Auth code for a domain.

In order to request an Auth code of a domain one should utilize requestAuthCodeDomainRequest method. It reads the transfer authorization code (or EPP code) from the registry or triggers the registry to send the code to a domain owner (in case of .be and .eu, for instance.

Entering Geo Fence iconUse endpoint path below. Base URL is determined by both the target environment and API version.
GET {base_url}/domains/{id}/authcode

REQUEST VALUES

Name Type Description
id string Required.
auth_code_type varchar Optional.

REQUEST EXAMPLE

curl -X GET \
'https://api.cte.openprovider.eu/v1beta/domains/123456/authcode' \
-H 'Authorization: ,Bearer 2831a37fb8*******90b5aac822' \

RESPONSE EXAMPLE

{
"code": 0,
"data": {
"auth_code": "12345678",
"success": true,
"type": "external"
},
"desc": ""
}

Sometimes a domain might not have an Auth code assigned to it. in such case it may be necessary to reset. The procedure is barely any different from requesting an already existing one. If the situation requires you to reset an Auth code, you can use resetAuthCodeDomainRequest which will generate a new authorisation code if a certain registry allows it.

Entering Geo Fence iconUse endpoint path below. Base URL is determined by both the target environment and API version.
POST {base_url}/domains/{id}/authcode/reset

The method almost identical input parameters as a previous one:

REQUEST VALUES

Name Type Description
id string Required.

REQUEST EXAMPLE

curl -X POST \
'https://api.cte.openprovider.eu/v1beta/domains/123456/authcode' \
-H 'Authorization: ,Bearer 2831a37fb8*******90b5aac822' \
-H 'Content-Type: application/json' \
-d '{
{
"auth_code_type": "internal"
}

RESPONSE EXAMPLE

{
"code": 0,
"data": {
"auth_code": "12345678",
"domain_roid": "",
"epp_statuses": [
""
],
"success": true,
"type": "internal"
},
"desc": ""
}

Domain transfers can take up to five days to complete, but once the transfer is pending, you can expedite the process by approving it manually.

Was this article helpful?
0 out of 0 found this helpful