Користувальницькькі налаштування

Налаштування сайту


software:ovh

Розбіжності

Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.

Посилання на цей список змін

Наступна ревізія
Попередня ревізія
software:ovh [2020/08/30 03:08]
charon створено
software:ovh [2020/08/30 04:06] (поточний)
charon
Рядок 1: Рядок 1:
 ====== OVH ====== ====== OVH ======
 ===== Using API ===== ===== Using API =====
 +  * [[|https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/|First steps with OVH API]]
  
 +To work with API first create application: https://eu.api.ovh.com/createApp/
 +You will receive 2 keys: 
 +  - the application key (AK) - can be publicly shared;
 +  - secret application key (AS) - keep it secret. 
 +This is just start! Now you need to obtain Consumer key (CK)! To request consumer key you must use AK from previous step, write access rules and set redirection URL:
 +<code>
 +$ curl -XPOST -H"X-Ovh-Application: 7kbG7Bk7S9Nt7ZSV" -H "Content-type: application/json" \
 +https://eu.api.ovh.com/1.0/auth/credential  -d '{
 +    "accessRules": [
 +        {
 +            "method": "GET",
 +            "path": "/domain/zone/*"
 +        },
 +        {
 +            "method": "POST",
 +            "path": "/domain/zone/*"
 +        },
 +        {
 +            "method": "PUT",
 +            "path": "/domain/zone/*"
 +        },
 +        {
 +            "method": "DELETE",
 +            "path": "/domain/zone/*"
 +        }       
 +    ],
 +    "redirection":"https://www.mywebsite.com/"
 +}'
 +</code>
 +After that you'll receive CK and validation URL
 +<code>
 +{"validationUrl":"https://eu.api.ovh.com/auth/?credentialToken=iQ1joJE0OmSPlUAoSw1IvAPWDeaD87ZM64HEDvYq77IKIxr4bIu6fU8OtrPQEeRh","consumerKey":"MtSwSrPpNjqfVSmJhLbPyr2i45lSwPU1","state":"pendingValidation"}
 +</code>
 +Open validation URL and enter NIC handle and password to authorize CK.
  
 +Or you can go easy way: https://eu.api.ovh.com/createToken/ - fill NIC handle, password, script name (any), script description (any), Validity Unlimited, Rights:
 +<code>
 +GET /domain/zone/*
 +PUT /domain/zone/*
 +POST /domain/zone/*
 +DELETE /domain/zone/*
 +</code>
 +Create keys.
 +After that you'll get AK, AS and CK. Just put them to ACME client (Lego, for example).
software/ovh.1598746119.txt.gz · Востаннє змінено: 2020/08/30 03:08 повз charon