```php
<?php

require_once '../../../core/api_bootstrap.php';
require_once '../../../core/provider_auth.php';

$headers = getallheaders();

if(!isset($headers['Authorization'])){
Response::error("Authorization token missing",401);
}

$token = str_replace("Bearer ","",$headers['Authorization']);

try {

$payload = JWTAuth::verify($token);

$db = new Database();
$conn = $db->connect();

$stmt = $conn->prepare("
SELECT id,name,phone,email,account_status
FROM providers
WHERE id=:id
LIMIT 1
");

$stmt->execute([
':id'=>$payload->provider_id
]);

$provider = $stmt->fetch();

if(!$provider){
Response::error("Provider not found",404);
}

Response::success($provider);

}
catch(Exception $e){

Response::error("Invalid token",401);

}