{"id":16444730,"url":"https://github.com/osavchenko/oauth2-cloudconvert","last_synced_at":"2026-04-16T22:31:29.230Z","repository":{"id":57033300,"uuid":"400865028","full_name":"osavchenko/oauth2-cloudconvert","owner":"osavchenko","description":"CloudConvert Provider for the OAuth 2.0 Client ","archived":false,"fork":false,"pushed_at":"2021-09-17T17:54:59.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-26T07:15:43.820Z","etag":null,"topics":["cloudconvert","oauth","oauth-provider","oauth2"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osavchenko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-28T18:37:11.000Z","updated_at":"2021-11-30T08:30:36.000Z","dependencies_parsed_at":"2022-08-23T20:50:21.490Z","dependency_job_id":null,"html_url":"https://github.com/osavchenko/oauth2-cloudconvert","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/osavchenko/oauth2-cloudconvert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osavchenko%2Foauth2-cloudconvert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osavchenko%2Foauth2-cloudconvert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osavchenko%2Foauth2-cloudconvert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osavchenko%2Foauth2-cloudconvert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osavchenko","download_url":"https://codeload.github.com/osavchenko/oauth2-cloudconvert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osavchenko%2Foauth2-cloudconvert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31907435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudconvert","oauth","oauth-provider","oauth2"],"created_at":"2024-10-11T09:25:24.718Z","updated_at":"2026-04-16T22:31:29.205Z","avatar_url":"https://github.com/osavchenko.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudConvert Provider for OAuth 2.0 Client\n\n[![Source Code](https://img.shields.io/badge/source-osavchenko/oauth2--cloudconvert-blue.svg?style=flat-square)](https://github.com/osavchenko/oauth2-cloudconvert)\n[![Latest Version](https://img.shields.io/github/release/osavchenko/oauth2-cloudconvert.svg?style=flat-square)](https://github.com/osavchenko/oauth2-cloudconvert/releases)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://github.com/osavchenko/oauth2-cloudconvert/blob/master/LICENSE)\n[![Build Status](https://img.shields.io/github/workflow/status/osavchenko/oauth2-cloudconvert/CI?label=CI\u0026logo=github\u0026style=flat-square)](https://github.com/osavchenko/oauth2-cloudconvert/actions?query=workflow%3ACI)\n[![Quality Score](https://img.shields.io/scrutinizer/g/osavchenko/oauth2-cloudconvert.svg?style=flat-square)](https://scrutinizer-ci.com/g/osavchenko/oauth2-cloudconvert)\n[![Codecov Code Coverage](https://img.shields.io/codecov/c/gh/osavchenko/oauth2-cloudconvert?label=codecov\u0026logo=codecov\u0026style=flat-square)](https://codecov.io/gh/osavchenko/oauth2-cloudconvert)\n\nThis package provides [CloudConvert](https://cloudconvert.com/) OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/osavchenko/oauth2-cloudconvert).\n\n## Installation\n\nTo install, use composer:\n\n```\ncomposer require osavchenko/oauth2-cloudconvert\n```\n\n## Usage\n\nUsage is the same as The League's OAuth client, using `\\Osavchenko\\OAuth2\\Client\\Provider\\CloudConvert` as the provider.\n\n### Authorization Code Flow\n\n```php\n$provider = new Osavchenko\\OAuth2\\Client\\Provider\\CloudConvert([\n    'clientId'     =\u003e '{cloud-convert-client-id}',\n    'clientSecret' =\u003e '{cloud-convert-client-secret}',\n    'redirectUri'  =\u003e 'https://example.com/callback-url',\n    'sandbox'      =\u003e false, // optional\n]);\n\nif (!isset($_GET['code'])) {\n    // If we don't have an authorization code then get one\n    $authUrl = $provider-\u003egetAuthorizationUrl();\n    $_SESSION['oauth2state'] = $provider-\u003egetState();\n    header('Location: '.$authUrl);\n    exit;\n}\n\n// Check given state against previously stored one to mitigate CSRF attack\nif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {\n    unset($_SESSION['oauth2state']);\n    exit('Invalid state');\n}\n\n// Try to get an access token (using the authorization code grant)\n$token = $provider-\u003egetAccessToken('authorization_code', [\n    'code' =\u003e $_GET['code']\n]);\n\n// Optional: Now you have a token you can look up a users profile data\ntry {\n    // We got an access token, let's now get the user's details\n    $user = $provider-\u003egetResourceOwner($token);\n\n    // Use these details to create a new profile\n    printf('Hello %s!', $user-\u003egetNickname());\n} catch (Exception $e) {\n    // Failed to get user details\n    exit('Oh dear...');\n}\n\n// Use this to interact with an API on the users behalf\necho $token-\u003egetToken();\n}\n```\n\n### Managing Scopes\n\nWhen creating your CloudConvert authorization URL, you can specify the state and scopes your application may authorize.\n\n```php\n$options = [\n    'state' =\u003e 'OPTIONAL_CUSTOM_CONFIGURED_STATE',\n    'scope' =\u003e ['user.read','task.read'], // array or string\n];\n\n$authorizationUrl = $provider-\u003egetAuthorizationUrl($options);\n```\nIf neither are defined, the provider will utilize internal defaults.\n\nAt the time of authoring this documentation, the [following scopes are available](https://cloudconvert.com/api/v2#authentication).\n\n- user.read\n- user.write\n- task.read \n- task.write\n- webhook.read\n- webhook.write\n\n## Testing\n\n``` bash\n$ ./vendor/bin/phpunit\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](https://github.com/osavchenko/oauth2-cloudconvert/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosavchenko%2Foauth2-cloudconvert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosavchenko%2Foauth2-cloudconvert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosavchenko%2Foauth2-cloudconvert/lists"}