Last Modified February 22, 2021

Licenses Resend License Key

  1. API Request
  2. API Response
  3. Request Examples
  4. Response Examples

 

Use the Licenses Resend License Key API to retrieve or resend the License Key to the Multi-User / Floating License Administrator (i.e. the Activation Email used on the initial activation of the License.

The License Key is used to authenticate the License Administrator when they first access the License Manager portal and want to set the License Admin Password.

The License Key Custom Email used can be customized in the Product Configuration screen of the DNA Control Panel.

HTTP Verb Element Syntax
POST URL https://api.softworkz.com/v1/Licenses/<productId>/<licenseId>/licensekey
Body
{
    "UserIp":"<userIp>",
    "Test":<Test>,
    "SendDnaEmail":<SendDnaEmail>
}
                                    

Retrieves the License Key and:

  • if SendDnaEmail=true, software_DNA sends a Custom Email to the <Activation Email> with the License Key
  • if SendDnaEmail=false, the License Key is included in the API Response for you to communicate to the End-User, and no email will be sent by software_DNA. You should not display to the User, and instead, send the License Key to the Activation Email, which is the Administrator of the License

You must provide the End User IP Address. The IP Address is used to protect your implementation and this API from abuse and is only used to manage the IP Lockout feature of this API. The IP Lockout will be triggered after multiple invalid attempts in a given period, and a set cooling period will be enacted. Both are system-wide settings.

Where:

Parameter Type Value Required Default
<productId> string the DNA ProductID Yes  
<licenseId> string the License Activation Code Yes  
<userIp> string the User's IP Address, for protection against end-user abuse Yes  
<Test> bool if true, this is a Test Event No false
<SendDnaEmail> bool if true, software_DNA will send the License Key Custom Email to the License Email No true

 

API Response

Success HTTP Status Code Description
200 OK The License Key is provided in the API Response because SendDnaEmail = false
204 No Content The License Key was sent to the <Activation Email> because SendDnaEmail = true
Error HTTP Status Code Description
400 Bad Request one of the parameters was invalid or missing - check error message in Response for details
401 Unauthorized Basic Authentication failed - verify that you are using the correct <clientId> and <apiKey> information in the Basic Authentication Header
404 Not Found The <productId> and/or the <licenseId> was not found
409 Conflict A Test Event for an ACTIVE Product was received succesfully - but the Password Recovery process was not started, and no Password Reset Code was provided.
429 Too Many Requests You have exceeded the allowed maximum of API Requests in the period - check "X-RateLimit-Reset" for the number of seconds remaining before reset
500 Internal Error An error occured on the DNA Server - try again later. Tech Support has been notified

 

Examples of API Requests

POST Licenses Password Recovery example

curl -v -X POST https://api.softworkz.com/v1/licenses/<productId>/TEST12345/licensekey
-H "Accept: application/json"
-u "<clientId>:<API Key>"
-d ’{"UserIp":"0.0.0.0","SendDnaEmail":false}’
                

 

Example of API Response with Licenses Resend License Key

  • if SendDnaEmail = true, no response body provided
  • if SendDnaEmail = false:
    {
      "LicenseKey": "*******************"
    }
                    		

 

Example of API Error Response

{
  "Message": "Invalid ProductId format"
}