Skip to content

Instantly share code, notes, and snippets.

@nsaqib-cw
nsaqib-cw / Cloudways API Python Example.py
Last active October 30, 2020 18:38
Cloudways API Python Example
import urllib
import urlparse
import requests
import json
import random
import time
#Fetch Key from platform.cloudways.com/api
API_SECRET_KEY ="YOUR SECRET API KEY"
EMAIL ="YOUR EMAIL Address"
@nsaqib-cw
nsaqib-cw / Cloudways API PHP Example.php
Last active November 30, 2023 19:05
Cloudways API PHP Example
<?php
//Use this function to contact CW API
/**
*
* @param string $method GET|POST|PUT|DELETE
* @param string $url relative URL for the call
* @param string $accessToken Access token generated using OAuth Call
* @param type $post Optional post data for the call
* @return object Output from CW API
*/