Detailed ShareFile Authentication Debug ===================================== Configuration: ============== Subdomain: cazarin Client ID: CwOHHD06vOwW4QlxPEYH4GULOhgoZLAw Client Secret: l1ua****Zjjk Username: david@cazarin.com Password: ******************* Test 1: Direct Authentication (like oauth_password_grant.php) ============================================================ URL: https://cazarin.sharefile.com/oauth/token Data: grant_type=password&username=david%40cazarin.com&password=if3w+ynzy+pfgx+i4dg&client_id=CwOHHD06vOwW4QlxPEYH4GULOhgoZLAw&client_secret=l1ua69h2mLoVmzgasRxq8H0F7SPXJedDYAqifLPFbLJkZjjk Response: ========= HTTP Code: 400 Response Body: {"error":"invalid_grant","error_description":"invalid username or password"} ❌ Test 1 FAILED: Direct authentication failed Error: invalid_grant Description: invalid username or password Test 2: SimpleShareFileAPI Simulation ===================================== Response: ========= HTTP Code: 400 Response Body: {"error":"invalid_grant","error_description":"invalid username or password"} ❌ Test 2 FAILED: SimpleShareFileAPI simulation failed Error: invalid_grant Description: invalid username or password Test 3: SimpleShareFileAPI Class Loading ======================================== ✅ SimpleShareFileAPI.php loaded successfully ❌ Error loading SimpleShareFileAPI: Failed to authenticate with ShareFile API: Authentication failed with HTTP code: 400 Stack trace: #0 /home/cazarindev/sfapi/src/SimpleShareFileAPI.php(28): ShareFileConnector\SimpleShareFileAPI->authenticate() #1 /home/cazarindev/sfapi/detailed_auth_debug.php(174): ShareFileConnector\SimpleShareFileAPI->__construct() #2 {main} Analysis: ========= If Test 1 works but Test 2 fails: There's a difference in the request format If Test 2 works but Test 3 fails: There's an issue with the class implementation If all tests fail: There's a fundamental authentication issue If all tests pass: The issue might be elsewhere in the connector