OFAA OAID API v2
This commit is contained in:
@@ -27,18 +27,17 @@ $headers = [
|
||||
];
|
||||
|
||||
$confirm_url = str_replace("{oaid}", $oaid, $ep_confirm_oaid);
|
||||
$out = putRestUrl($confirm_url, $headers, ["token" => "confirmed"], "application/json");
|
||||
if($output == "__err__401") {
|
||||
$out = patchRestUrl($confirm_url, $headers, ["token" => "confirmed"], "application/json");
|
||||
if($out == "__err__401") {
|
||||
$access_token = fetchAccessToken($oauth_url, $client_id, $client_secret, $default_scope);
|
||||
$headers = [
|
||||
"Authorization: Bearer $access_token",
|
||||
"Accept: application/json",
|
||||
"Content-type: application/json",
|
||||
];
|
||||
$out = putRestUrl($confirm_url, $headers, ["token" => "confirmed"], "application/json");
|
||||
$u++;
|
||||
$out = patchRestUrl($confirm_url, $headers, ["token" => "confirmed"], "application/json");
|
||||
}
|
||||
|
||||
echo "$oaid_name confirmed.\n";
|
||||
echo "$oaid confirmed.\n";
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user