{"id":15018985,"url":"https://github.com/noweh/laravel-soundcloud","last_synced_at":"2025-09-12T22:31:38.186Z","repository":{"id":37083863,"uuid":"421865711","full_name":"noweh/laravel-soundcloud","owner":"noweh","description":"A Laravel Wrapper for the Soundcloud REST API endpoints","archived":false,"fork":false,"pushed_at":"2024-11-22T14:08:23.000Z","size":34,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-18T15:53:22.413Z","etag":null,"topics":["api","laravel","php","soundcloud","soundcloud-api","soundcloud-player"],"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/noweh.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-27T15:07:58.000Z","updated_at":"2024-11-22T14:07:49.000Z","dependencies_parsed_at":"2024-09-12T06:15:57.057Z","dependency_job_id":null,"html_url":"https://github.com/noweh/laravel-soundcloud","commit_stats":{"total_commits":10,"total_committers":4,"mean_commits":2.5,"dds":"0.30000000000000004","last_synced_commit":"3ec399ea9b85cfe7da682d4b13351b2b7c67db09"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/noweh/laravel-soundcloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noweh%2Flaravel-soundcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noweh%2Flaravel-soundcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noweh%2Flaravel-soundcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noweh%2Flaravel-soundcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noweh","download_url":"https://codeload.github.com/noweh/laravel-soundcloud/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noweh%2Flaravel-soundcloud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274886731,"owners_count":25368226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","laravel","php","soundcloud","soundcloud-api","soundcloud-player"],"created_at":"2024-09-24T19:52:43.274Z","updated_at":"2025-09-12T22:31:37.774Z","avatar_url":"https://github.com/noweh.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SoundCloud API for Laravel\n\n![SoundCloud](https://img.shields.io/static/v1?style=flat-square\u0026message=SoundCloud\u0026color=FF3300\u0026logo=SoundCloud\u0026logoColor=FFFFFF\u0026label=)\n![Laravel](https://img.shields.io/badge/Laravel-v5/6/7/8/9/10-828cb7.svg?style=flat-square\u0026logo=Laravel\u0026color=FF2D20)\n![PHP](https://img.shields.io/badge/PHP-v7.3-828cb7.svg?style=flat-square\u0026logo=php)\n[![MIT Licensed](https://img.shields.io/github/license/noweh/laravel-soundcloud)](licence.md)\n[![last version](https://img.shields.io/packagist/v/noweh/laravel-soundcloud)](https://packagist.org/packages/noweh/laravel-soundcloud)\n[![Downloads](https://img.shields.io/packagist/dt/noweh/laravel-soundcloud)](https://packagist.org/packages/noweh/laravel-soundcloud)\n\nA Laravel Wrapper for the SoundCloud REST API endpoints.\n\n## Installation\nFirst, you need to add the component to your composer.json.\n```\ncomposer require noweh/laravel-soundcloud\n```\nUpdate your packages with *composer update* or install with *composer install*.\n\nLaravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.\n\n### Laravel without auto-discovery\n\n    Noweh\\SoundcloudApi\\SoundcloudServiceProvider::class,\n\nTo use the facade, add this in app.php:\n\n    'Soundcloud' =\u003e Noweh\\SoundcloudApi\\SoundcloudFacade::class,\n\n### Service Provider\nAfter updating composer, add the ServiceProvider to the providers array in config/app.php\n\n## Configuration file\n\nNext, you must migrate config :\n\n    php artisan vendor:publish --provider=\"Noweh\\SoundcloudApi\\SoundcloudServiceProvider\"\n\n⚠️ `{CALLBACK_URL}` must be identical to the one indicated in your SoundCloud account.\n⚠️ `{SOUNDCLOUD_CODE_VERIFIER}` must be a random string of 43 to 128 characters: (https://blog.postman.com/what-is-pkce/)\n\n## Usage\n\n⚠️ Since [July 2021](https://developers.soundcloud.com/blog/security-updates-api), most calls to SoundCloud REST API requires an `access_token`.\n⚠️ Since October 2024, SoundCloud will require all API calls to be authenticated with an `code_verifier`.\n\nYou have to redirect the user to the SoundCloud login page:\n```php\nreturn redirect(\\Soundcloud::getAuthorizeUrl('a_custom_param_to_retrieve_in_callback'));\n```\n\nOn your callback URL, you can call GET/POST/PUT/DELETE methods. The `access_token` will be automatically generated with the `code` parameter present in this URL.\n\nIf you want to use API calls in another page, you have to set manually this data:\n```\n\\Soundcloud::setCode('3-134981-158678512-IwAXqypKWlDJCF');\n\n// API Call\n...\n```\n\n\n### Get Player Embed\n#### This call doest not requires an access_token.\n\nTo retrieve the widget embed code for any SoundCloud URL pointing to a user, set, or a playlist, do the following:\n```\n// Required parameter\n$url = 'https://soundcloud.com/......';\n\n// Optional parameters\n$maxheight = 180;\n$sharing = true;\n$liking = true;\n$download = false;\n$show_comments = true;\n$show_playcount = false;\n$show_user = false;\n\ntry {\n    $response = \\Soundcloud::getPlayerEmbed($url, $maxheight, $sharing, $liking, $download, $show_comments, $show_playcount, $show_user)\n} catch (Exception $e) {\n    exit($e-\u003egetMessage());\n}\n```\n\n### GET\n```\ntry {\n    $response = \\Soundcloud::get('users/{CLIENT_ID}/tracks');\n} catch (Exit $e) {\n    exit($e-\u003egetMessage());\n}\n```\n\n### GET with pagination\n\nMost results from our API are returned as a collection. The number of items in the collection returned is limited to 50 by default with a maximum value of 200. Most endpoints support a linked_partitioning parameter that allows you to page through collections. When this parameter is passed, the response will contain a next_href property if there are additional results. To fetch the next page of results, simply follow that URI. If the response does not contain a next_href property, you have reached the end of the results.\n\n```\ntry {\n    $tracks = [];\n    $params = ['linked_partitioning' =\u003e true, 'limit' =\u003e 100 ];\n    $response = \\Soundcloud::get('users/{CLIENT_ID}/tracks', $params);\n    while (property_exists($response, 'next_href') \u0026\u0026 !empty($response-\u003enext_href)) {\n        $tracks = array_merge($tracks,$response-\u003ecollection);\n        $response = \\Soundcloud::get($response-\u003enext_href);\n    }\n} catch (Exit $e) {\n    exit($e-\u003egetMessage());\n}\n```\n\n### POST\n```\ntry {\n    $response = \\Soundcloud::post(\n        'tracks/1/comments',\n        [\n            'body' =\u003e 'a new comment'\n        ]\n    );\n} catch (Exception $e) {\n    exit($e-\u003egetMessage());\n}\n```\n\n### PUT\n```\ntry {\n    $response = \\Soundcloud::put(\n        'tracks/1',\n        [\n            'title' =\u003e 'my new title'\n        ]\n    );\n} catch (Exception $e) {\n    exit($e-\u003egetMessage());\n}\n```\n\n### DELETE\n```\ntry {\n    $response = \\Soundcloud::delete('tracks/1');\n} catch (Exception $e) {\n    exit($e-\u003egetMessage());\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoweh%2Flaravel-soundcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoweh%2Flaravel-soundcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoweh%2Flaravel-soundcloud/lists"}