Autodesk-Forge / forge-php-client

Forge PHP SDK: Enables you to easily integrate the Forge REST APIs into your application, including OAuth, Data Management,Model Derivative, and Design Automation
Apache License 2.0
41 stars 52 forks source link

ISSUE with Secured SSL SITE #52

Open pankajmalkani opened 3 years ago

pankajmalkani commented 3 years ago

My site already has Secured SSL, but however i have encountered the issue while uploading the dwg files below "Exception when calling BucketsApi->createBucket: API call to https://developer.api.autodesk.com/oss/v2/buckets failed: SSL certificate problem: self signed certificate in certificate chain"

Please let me know the solution ASAP for this above menioned issue.

thanks and regards, Pankaj

yiskang commented 2 years ago

Sounds related to this issue: https://github.com/guzzle/guzzle/issues/1855

A workaround is to disable SSL certificate validation at https://github.com/Autodesk-Forge/core-php-client/blob/3d55f599a5f90b8710057ee051a1061b236933fd/lib/Auth/TokenFetcher.php#L52 like the below according to the GuzzleHttp API documentation:

if ($httpClient === null) {
    $httpClient = new GuzzleClient([
      'verify' => false
    ]);
}

You can do this change in the vendor/autodesk/core/lib/Auth/TokenFetcher.php folder of his PHP project. If it doesn't work, you need to check your php.ini and find if there are any special SSL settings that exist (see ref).

enter image description here