{"id":1381,"date":"2023-02-19T16:44:20","date_gmt":"2023-02-19T14:44:20","guid":{"rendered":"https:\/\/cln.io\/blog\/?p=1381"},"modified":"2024-09-19T18:21:15","modified_gmt":"2024-09-19T16:21:15","slug":"using-the-ovh-api-ovhcloud-with-tines","status":"publish","type":"post","link":"https:\/\/cln.io\/blog\/using-the-ovh-api-ovhcloud-with-tines\/","title":{"rendered":"Using the OVH API (OVHcloud) with Tines"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I&#8217;ve had to tinker a bit to get the OVH API working within Tines, but eventually succeeded.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">INVALID_SIGNATURE was my main hurdle, but eventually got it working, make sure you have API details created beforehand<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" href=\"https:\/\/eu.api.ovh.com\/createToken\/.\" target=\"_blank\">https:\/\/eu.api.ovh.com\/createToken\/<\/a>, see their documentation at <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.ovh.com\/gb\/en\/api\/first-steps-with-ovh-api\/\" target=\"_blank\">https:\/\/docs.ovh.com\/gb\/en\/api\/first-steps-with-ovh-api\/<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The all-in-one block<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/image-34.png\" alt=\"\" class=\"wp-image-1383\" width=\"388\" height=\"147\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/image-34.png 388w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/image-34-300x114.png 300w\" sizes=\"auto, (max-width: 388px) 100vw, 388px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The magic for using 1 block is using the LOCAL block <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"935\" height=\"289\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/image-35.png\" alt=\"\" class=\"wp-image-1384\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/image-35.png 935w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/image-35-300x93.png 300w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/image-35-768x237.png 768w\" sizes=\"auto, (max-width: 935px) 100vw, 935px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">These are my Local values and content<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n  \"url\": \"https:\/\/api.ovh.com\/1.0\/ip\",\n  \"method\": \"GET\",\n  \"body\": \"&lt;&lt;>>\",\n  \"timestamp\": \"&lt;&lt;UNIX_TIMESTAMP()>>\",\n  \"clear_sign\": \"&lt;&lt;CREDENTIAL.ovh_api_application_secret>>+&lt;&lt;CREDENTIAL.ovh_api_consumer_key>>+&lt;&lt;LOCAL.method>>+&lt;&lt;LOCAL.url>>+&lt;&lt;LOCAL.body>>+&lt;&lt;LOCAL.timestamp>>\",\n  \"signature\": \"$1$&lt;&lt;SHA1(LOCAL.clear_sign)>>\"\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">this way we can set up the signature and hash it within 1 block and send it with the HEADER<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"425\" height=\"407\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/image-36.png\" alt=\"\" class=\"wp-image-1385\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/image-36.png 425w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/image-36-300x287.png 300w\" sizes=\"auto, (max-width: 425px) 100vw, 425px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Full block copy-paste below<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"standardLibVersion\": \"14\",\n    \"actionRuntimeVersion\": \"4\",\n    \"agents\": [\n        {\n            \"disabled\": false,\n            \"name\": \"Get OVH IP addresses\",\n            \"description\": null,\n            \"options\": \"{\\\"url\\\":\\\"&lt;&lt;LOCAL.url>>\\\",\\\"content_type\\\":\\\"application_json\\\",\\\"method\\\":\\\"=LOCAL.method\\\",\\\"headers\\\":{\\\"X-Ovh-Application\\\":\\\"=CREDENTIAL.ovh_api_application_key\\\",\\\"X-Ovh-Consumer\\\":\\\"=CREDENTIAL.ovh_api_consumer_key\\\",\\\"X-Ovh-Timestamp\\\":\\\"=LOCAL.timestamp\\\",\\\"X-Ovh-Signature\\\":\\\"=LOCAL.signature\\\"},\\\"local\\\":{\\\"url\\\":\\\"https:\/\/api.ovh.com\/1.0\/ip\\\",\\\"method\\\":\\\"GET\\\",\\\"body\\\":\\\"&lt;&lt;>>\\\",\\\"timestamp\\\":\\\"&lt;&lt;UNIX_TIMESTAMP()>>\\\",\\\"clear_sign\\\":\\\"&lt;&lt;CREDENTIAL.ovh_api_application_secret>>+&lt;&lt;CREDENTIAL.ovh_api_consumer_key>>+&lt;&lt;LOCAL.method>>+&lt;&lt;LOCAL.url>>+&lt;&lt;LOCAL.body>>+&lt;&lt;LOCAL.timestamp>>\\\",\\\"signature\\\":\\\"$1$&lt;&lt;SHA1(LOCAL.clear_sign)>>\\\"}}\",\n            \"position\": {\n                \"x\": 1950,\n                \"y\": 765\n            },\n            \"type\": \"httpRequest\",\n            \"timeSavedUnit\": \"minutes\",\n            \"timeSavedValue\": 0,\n            \"monitorAllEvents\": false,\n            \"monitorFailures\": false,\n            \"monitorNoEventsEmitted\": null,\n            \"form\": null\n        }\n    ],\n    \"links\": [],\n    \"diagramNotes\": []\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The 3-block setup<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"208\" height=\"265\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/image-33.png\" alt=\"\" class=\"wp-image-1382\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Same as the all-in-1 but spread in 3 blocks, for readability &amp; debugging purposes<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"standardLibVersion\": \"14\",\n    \"actionRuntimeVersion\": \"4\",\n    \"agents\": [\n        {\n            \"disabled\": false,\n            \"name\": \"Get OVH IP addresses\",\n            \"description\": null,\n            \"options\": \"{\\\"url\\\":\\\"&lt;&lt;ovh_api_to_request.url>>\\\",\\\"content_type\\\":\\\"application_json\\\",\\\"method\\\":\\\"get\\\",\\\"headers\\\":{\\\"X-Ovh-Application\\\":\\\"=CREDENTIAL.ovh_api_application_key\\\",\\\"X-Ovh-Consumer\\\":\\\"=CREDENTIAL.ovh_api_consumer_key\\\",\\\"X-Ovh-Timestamp\\\":\\\"=ovh_api_to_request.timestamp\\\",\\\"X-Ovh-Signature\\\":\\\"=ovh_signature\\\"},\\\"local\\\":{}}\",\n            \"position\": {\n                \"x\": 1575,\n                \"y\": 1035\n            },\n            \"type\": \"httpRequest\",\n            \"timeSavedUnit\": \"minutes\",\n            \"timeSavedValue\": 0,\n            \"monitorAllEvents\": false,\n            \"monitorFailures\": false,\n            \"monitorNoEventsEmitted\": null,\n            \"form\": null\n        },\n        {\n            \"disabled\": false,\n            \"name\": \"OVH Signature\",\n            \"description\": null,\n            \"options\": \"{\\\"mode\\\":\\\"message_only\\\",\\\"loop\\\":false,\\\"payload\\\":\\\"$1$&lt;&lt;SHA1(LOCAL.clear_sign)>>\\\",\\\"local\\\":{\\\"clear_sign\\\":\\\"&lt;&lt;CREDENTIAL.ovh_api_application_secret>>+&lt;&lt;CREDENTIAL.ovh_api_consumer_key>>+&lt;&lt;ovh_api_to_request.method>>+&lt;&lt;ovh_api_to_request.url>>+&lt;&lt;ovh_api_to_request.body>>+&lt;&lt;ovh_api_to_request.timestamp>>\\\"}}\",\n            \"position\": {\n                \"x\": 1575,\n                \"y\": 930\n            },\n            \"type\": \"eventTransformation\",\n            \"timeSavedUnit\": \"minutes\",\n            \"timeSavedValue\": 0,\n            \"monitorAllEvents\": false,\n            \"monitorFailures\": false,\n            \"monitorNoEventsEmitted\": null,\n            \"form\": null\n        },\n        {\n            \"disabled\": false,\n            \"name\": \"OVH API to request\",\n            \"description\": null,\n            \"options\": \"{\\\"mode\\\":\\\"message_only\\\",\\\"loop\\\":false,\\\"payload\\\":{\\\"url\\\":\\\"https:\/\/api.ovh.com\/1.0\/ip\\\",\\\"method\\\":\\\"GET\\\",\\\"body\\\":\\\"\\\",\\\"timestamp\\\":\\\"&lt;&lt;UNIX_TIMESTAMP()>>\\\"}}\",\n            \"position\": {\n                \"x\": 1575,\n                \"y\": 825\n            },\n            \"type\": \"eventTransformation\",\n            \"timeSavedUnit\": \"minutes\",\n            \"timeSavedValue\": 0,\n            \"monitorAllEvents\": false,\n            \"monitorFailures\": false,\n            \"monitorNoEventsEmitted\": null,\n            \"form\": null\n        }\n    ],\n    \"links\": [\n        {\n            \"sourceIdentifier\": 2,\n            \"receiverIdentifier\": 1\n        },\n        {\n            \"sourceIdentifier\": 1,\n            \"receiverIdentifier\": 0\n        }\n    ],\n    \"diagramNotes\": []\n}<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/john-barkiple-l090uFWoPaI-unsplash-1024x683.jpg\" alt=\"\" class=\"wp-image-1387\" srcset=\"https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/john-barkiple-l090uFWoPaI-unsplash-1024x683.jpg 1024w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/john-barkiple-l090uFWoPaI-unsplash-300x200.jpg 300w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/john-barkiple-l090uFWoPaI-unsplash-768x512.jpg 768w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/john-barkiple-l090uFWoPaI-unsplash-1536x1024.jpg 1536w, https:\/\/cln.io\/blog\/wp-content\/uploads\/2023\/02\/john-barkiple-l090uFWoPaI-unsplash.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Photo by <a href=\"https:\/\/unsplash.com\/@barkiple?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">John Barkiple<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/l090uFWoPaI?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/figcaption><\/figure>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve had to tinker a bit to get the OVH API working within Tines, but eventually succeeded. INVALID_SIGNATURE was my main hurdle, but eventually got it working, make sure you have API details created beforehand [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1386,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,59],"tags":[],"class_list":["post-1381","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","category-tines"],"_links":{"self":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts\/1381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/comments?post=1381"}],"version-history":[{"count":2,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts\/1381\/revisions"}],"predecessor-version":[{"id":1389,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts\/1381\/revisions\/1389"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/media\/1386"}],"wp:attachment":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/media?parent=1381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/categories?post=1381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/tags?post=1381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}