{"id":16599,"date":"2020-07-24T11:31:48","date_gmt":"2020-07-24T11:31:48","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=16599"},"modified":"2022-04-13T15:58:36","modified_gmt":"2022-04-13T15:58:36","slug":"how-to-login-from-php-7-using-linkedin-api","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-login-from-php-7-using-linkedin-api\/","title":{"rendered":"How to Sign-in or login from PHP 7 using LinkedIn API?"},"content":{"rendered":"\n<p>In this blog, I am going to explain How to Login from <strong>PHP<\/strong> using <strong>LinkedIn<\/strong> <strong>API<\/strong>. So, before you go to <strong>XAMPP<\/strong> folder&#8217;s <strong>htdocs<\/strong> and create a new folder. After that, click right button and select &#8220;<strong>Git bash Here<\/strong>&#8221; and <\/p>\n\n\n\n<p>type -&#8220;<strong>composer require guzzlehttp\/guzzle:^7.0<\/strong>&#8221; after that auto-create <strong>composer<\/strong>, <strong>guzzlehttp<\/strong>, <strong>autoloader<\/strong> &amp; some important file. After that, create a file as <strong>index.php<\/strong> as shown below- You can use extra <strong>CSS<\/strong> for attractive<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"588\" height=\"323\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/composer-install.png\" alt=\"\" class=\"wp-image-16603\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/composer-install.png 588w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/composer-install-300x165.png 300w\" sizes=\"auto, (max-width: 588px) 100vw, 588px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"685\" height=\"160\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/file-1.png\" alt=\"\" class=\"wp-image-16615\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/file-1.png 685w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/file-1-300x70.png 300w\" sizes=\"auto, (max-width: 685px) 100vw, 685px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"699\" height=\"258\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/file-2-1.png\" alt=\"\" class=\"wp-image-16620\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/file-2-1.png 699w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/file-2-1-300x111.png 300w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/figure>\n\n\n\n<script src=\"https:\/\/gist.github.com\/ajcotocus\/138758a5d909c7e06c6afa4ec4fb45f5.js\"><\/script>\n\n\n\n<p><strong>These are folder after install Composer<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"561\" height=\"319\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/sign-in-linkedin-1.png\" alt=\"\" class=\"wp-image-16623\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/sign-in-linkedin-1.png 561w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/sign-in-linkedin-1-300x171.png 300w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/figure>\n\n\n\n<p>This is form of <strong>Index.php<\/strong><\/p>\n\n\n\n<p>After that, create another file like &#8220;<strong>config.php<\/strong>&#8221; and type shown below-<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/ajcotocus\/f2b9b39385041fa90ff497d87834f22d.js\"><\/script>\n\n\n\n<p>After that, you will be required <strong>Client ID<\/strong>, and <strong>Client Secret<\/strong>, so these before going to <strong><a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/www.linkedin.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.linkedin.com\/<\/a> <\/strong>developers and <strong>create app<\/strong> and fillup this form and <strong>create APP<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"686\" height=\"296\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/create-app.png\" alt=\"\" class=\"wp-image-16609\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/create-app.png 686w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/create-app-300x129.png 300w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"912\" height=\"651\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/linkedin-developer.png\" alt=\"\" class=\"wp-image-16608\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/linkedin-developer.png 912w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/linkedin-developer-300x214.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/linkedin-developer-768x548.png 768w\" sizes=\"auto, (max-width: 912px) 100vw, 912px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"645\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/secret-id-secret-key.png\" alt=\"\" class=\"wp-image-16611\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/secret-id-secret-key.png 998w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/secret-id-secret-key-300x194.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/secret-id-secret-key-768x496.png 768w\" sizes=\"auto, (max-width: 998px) 100vw, 998px\" \/><\/figure>\n\n\n\n<p>When you create App id after that provide <strong>Client id<\/strong> &amp; <strong>Client Secret<\/strong> in <strong>Config.php<\/strong> file and run <strong>index.php<\/strong> file in your browser before run you start <strong>XAMPP<\/strong> then will be run your<strong> index<\/strong> file like shown upper sign page and click <strong>sign in<\/strong> then next <strong>Sign in <\/strong>and<strong> <\/strong>Allow<strong> Login<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"481\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/welcome-page-after-sign.png\" alt=\"\" class=\"wp-image-16613\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/welcome-page-after-sign.png 720w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/welcome-page-after-sign-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"539\" height=\"599\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/login-with-api.png\" alt=\"\" class=\"wp-image-16610\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/login-with-api.png 539w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/login-with-api-270x300.png 270w\" sizes=\"auto, (max-width: 539px) 100vw, 539px\" \/><\/figure>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_20387\"><iframe loading=\"lazy\"  id=\"_ytid_96602\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_20387\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, I am going to explain How to Login from PHP using LinkedIn API. So, before you go to XAMPP folder&#8217;s htdocs and create a new folder. After&#8230; <\/p>\n","protected":false},"author":1,"featured_media":16630,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5150],"tags":[1056,5736,897,177,6287,6292],"class_list":["post-16599","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-api","tag-linkedin","tag-login","tag-php","tag-php-7","tag-sign-in"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/16599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=16599"}],"version-history":[{"count":15,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/16599\/revisions"}],"predecessor-version":[{"id":24647,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/16599\/revisions\/24647"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/16630"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=16599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=16599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=16599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}