Wettmannstaetten impot update & ofaa oaid scripts
This commit is contained in:
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
require_once __DIR__."/include/config.php";
|
||||
require_once __DIR__."/include/rest.php";
|
||||
|
||||
|
||||
if(!$access_token) {
|
||||
$access_token = fetchAccessToken($oauth_url, $client_id, $client_secret, $default_scope);
|
||||
if(!$access_token) {
|
||||
die("Error getting access token");
|
||||
}
|
||||
}
|
||||
|
||||
$headers = [
|
||||
"Authorization: Bearer $access_token",
|
||||
"Accept: application/json",
|
||||
];
|
||||
|
||||
$content = [
|
||||
"version" => "v8",
|
||||
"external_id" => guidv4()
|
||||
];
|
||||
|
||||
$output = getRestUrl($ep_mgm_credits, $headers);
|
||||
if($output == "__err__401") {
|
||||
$access_token = fetchAccessToken($oauth_url, $client_id, $client_secret, $default_scope);
|
||||
$headers = [
|
||||
"Authorization: Bearer $access_token",
|
||||
"Accept: application/json",
|
||||
];
|
||||
$output = getRestUrl($ep_mgm_credits, $headers);
|
||||
}
|
||||
var_dump($output);exit;
|
||||
Reference in New Issue
Block a user