# Test cloud functions by actual name (not ID) $ct = "application/json" $appId = "ncloudmaster" # Test getApigInfo with X-Parse-Application-Id header Write-Host "=== getApigInfo (header auth) ===" -ForegroundColor Cyan try { $headers = @{ "X-Parse-Application-Id" = $appId; "Content-Type" = $ct } $body = '{"apigId":"Vo3ROWEvDy"}' $r = Invoke-WebRequest -Uri "https://server.fmode.cn/parse/functions/getApigInfo" -Method POST -Headers $headers -Body $body -TimeoutSec 15 Write-Host "Status: $($r.StatusCode) Body: $($r.Content)" -ForegroundColor Green } catch { $code = ""; $body = "" if ($_.Exception.Response) { $code = [int]$_.Exception.Response.StatusCode try { $stream = $_.Exception.Response.GetResponseStream(); $reader = New-Object System.IO.StreamReader($stream); $body = $reader.ReadToEnd() } catch {} } Write-Host "Status: $code Body: $body" -ForegroundColor Yellow } Write-Host "" # Test getApigInfo with _ApplicationId in body Write-Host "=== getApigInfo (body auth) ===" -ForegroundColor Cyan try { $body = '{"_ApplicationId":"ncloudmaster","apigId":"Vo3ROWEvDy"}' $r2 = Invoke-WebRequest -Uri "https://server.fmode.cn/parse/functions/getApigInfo" -Method POST -ContentType $ct -Body $body -TimeoutSec 15 Write-Host "Status: $($r2.StatusCode) Body: $($r2.Content)" -ForegroundColor Green } catch { $code = ""; $body = "" if ($_.Exception.Response) { $code = [int]$_.Exception.Response.StatusCode try { $stream = $_.Exception.Response.GetResponseStream(); $reader = New-Object System.IO.StreamReader($stream); $body = $reader.ReadToEnd() } catch {} } Write-Host "Status: $code Body: $body" -ForegroundColor Yellow } Write-Host "" # Test getApigAuth Write-Host "=== getApigAuth (header auth) ===" -ForegroundColor Cyan try { $headers = @{ "X-Parse-Application-Id" = $appId; "Content-Type" = $ct } $body = '{"userId":"nd7NOCmFiE","apigId":"Vo3ROWEvDy"}' $r3 = Invoke-WebRequest -Uri "https://server.fmode.cn/parse/functions/getApigAuth" -Method POST -Headers $headers -Body $body -TimeoutSec 15 Write-Host "Status: $($r3.StatusCode) Body: $($r3.Content)" -ForegroundColor Green } catch { $code = ""; $body = "" if ($_.Exception.Response) { $code = [int]$_.Exception.Response.StatusCode try { $stream = $_.Exception.Response.GetResponseStream(); $reader = New-Object System.IO.StreamReader($stream); $body = $reader.ReadToEnd() } catch {} } Write-Host "Status: $code Body: $body" -ForegroundColor Yellow }