Wettmannstaetten impot update & ofaa oaid scripts

This commit is contained in:
Frank Schubert
2023-07-11 11:43:15 +02:00
parent 2deeead7c6
commit 7c513a7595
10 changed files with 2781 additions and 11 deletions
+33
View File
@@ -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;