Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
AskingForHelp
New Contributor III

API command to register a license

Hello Community

 

I am attempting to use the FortiOS API to apply a license. The device is a FortiWifi 80F with Firmware 7.2.6.

I am attempting to apply the Advanced Malware Protection Free Trial, for testing purposes.

From help with the Fortinet Developer Network I have seen this command:

 

 

curl -X 'POST' \
  'https://192.168.20.1/api/v2/monitor/registration/forticare/add-license?access_token=xp40rkkhqcbfyr8Nq96H9G7H43q0f4' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "registration_code": "STRING"
}'

 

 

I am not sure what the registration_code value should be. I visited support.fortinet.com to gather the license key I wish to apply. It downloads as a .lic file. There is text in there but nothing matches the registration code. I have tried to insert the contract number as the string but this did not work.

Where can I find the registration code?

Am I using the wrong endpoint?

Appreciate it

1 Solution
saneeshpv_FTNT

Hi @AskingForHelp 

 

The FortiGate can be registered in either the FortiGate GUI or the FortiCloud support portal and the API above is to register a new license to the the support portal and this requires a Service Registration code which normally you will receive from the Fortinet Sales Department.

 

https://docs.fortinet.com/document/fortigate/7.4.1/administration-guide/893081/registration 

"The service contract number is needed to complete registrations on the FortiCloud support portal. You can find this 12-digit number in the email that contains your service registration document (sent from do-not-reply-contract@fortinet.com) in the service entitlement summary."

 

May I know how did you get the License file from the Fortinet portal? Have you registered the License already using the Registration code ?

 

If that is the case License will be automatically updated to the device once it has internet access. Usually it take sometime to update the license once the internet access is available.

 

Best Regards,
Saneesh

 

 

View solution in original post

3 REPLIES 3
Anthony_E
Community Manager
Community Manager

Hello,


Thank you for using the Community Forum. I will seek to get you an answer or help. We will reply to this thread with an update as soon as possible.


Thanks,

Anthony-Fortinet Community Team.
saneeshpv_FTNT

Hi @AskingForHelp 

 

The FortiGate can be registered in either the FortiGate GUI or the FortiCloud support portal and the API above is to register a new license to the the support portal and this requires a Service Registration code which normally you will receive from the Fortinet Sales Department.

 

https://docs.fortinet.com/document/fortigate/7.4.1/administration-guide/893081/registration 

"The service contract number is needed to complete registrations on the FortiCloud support portal. You can find this 12-digit number in the email that contains your service registration document (sent from do-not-reply-contract@fortinet.com) in the service entitlement summary."

 

May I know how did you get the License file from the Fortinet portal? Have you registered the License already using the Registration code ?

 

If that is the case License will be automatically updated to the device once it has internet access. Usually it take sometime to update the license once the internet access is available.

 

Best Regards,
Saneesh

 

 

AskingForHelp
New Contributor III

Hello saneeshpv_FTNT

This detail is a great help! I received the license file from the Fortinet Support site under Product List, FortiGuard Trial.

Is it true then, that even if I do not use this API command but only use the web GUI, the license will be applied automatically whenever the fortinet firewall next connects to the internet?

Labels
Top Kudoed Authors