PHP Classes

PHP OAuth Library package blog

Recommend this page to a friend!

Latest PHP OAuth Library package blog posts

  All package blogs All package blogs   PHP OAuth Library PHP OAuth Library   Blog PHP OAuth Library package blog   Post article Post article  
  14 - 5   4 - 1  

15. How to Implement PHP Sentiment Analysis Using Google Artificial Intelligence API to Process Natural Language Text

Updated on: 2024-01-10

Posted on:

The evolution of artificial intelligence allowed the implementation of more advanced solutions for complex problems like, for instance, the interpretation of human language.

One type of interpretation of human language is the analysis of sentiments expressed by people when they send text messages.

Read this step-by-step tutorial article to learn, for example, PHP code and how to use Google Cloud Natural Language API to analyze human sentiments using text messages from PHP.


Blog More ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)

14. Learn with a PHP OAuth2 Example Google API Access From the Console

Updated on: 2023-11-01

Posted on:

Some applications need to access APIs from the console to perform background tasks using, for instance, the crontab available in Linux-based systems to execute jobs at scheduled times.

Read this article to learn how to develop PHP scripts that can get OAuth2-based tokens to access a Google API from the console or as a task executed by corn.

OAuth is a protocol often used to access API on behalf of a user that grants permissions to access the services of an API on behalf of that user.

This allows applications to call APIs even when the user is not present accessing a Web page.

This is possible because the OAuth protocol can be used by Web services to provide token string values that applications can use to access the APIs whenever they want, using a token string as evidence that the user granted permission to access the APIs anytime the application runs.

So, what applications need to do to access an API from a console or a task started with the cron tool is to obtain that token string.

That needs to happen with the presence of the user. The user needs to go to a page of the application. There, the user browser is redirected to a page of the API service provided. The user is requested to permit the application to perform specific actions by calling the API.

[OAuth permission request page image]

After the user provides the requested permissions, the user's browser is redirected back to the application page. Then, the application calls the API following the OAuth protocol to retrieve the access token.

[OAuth application page showing the access token image]

From now on, the application can use the access token to perform API calls to which the user gave permission.


Blog More ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)

13. How Can the PHP OAuth Client Class Support New OAuth Servers

Updated on: 2022-02-17

Posted on:

OAuth is a flexible protocol that allows accessing APIs on behalf of users of a given service.

Despite OAuth is a standard, accessing a new OAuth server requires to create custom code to access the respective API or configure a generic OAuth client like this PHP OAuth client class to adapt its behaviour to access OAuth server using specific configuration values.

Read this article to learn how to support a new OAuth server just by adding a few lines to the JSON configuration file that this PHP OAuth client users.


Blog More ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)

12. Faster PHP Social Login with a PHP OpenID Connect PHP Client

Updated on: 2017-04-09

Posted on:

Many applications use OAuth authenticate users using their information retrieved from social network accounts with their permission.

However, each social network requires an additional API call to retrieve those user details. That API call is specific to each network, so its URL and parameters vary.

OpenID Connect is an extension of the OAuth2 protocol that allows to retrieve the user details without additional API calls.

Read this article to learn how it works and how you can benefit from OpenID Connect to get the user details faster without social network specific API calls.


Blog More ...   Post a comment Post a comment   See comments See comments (2)   Trackbacks (0)

11. Improving the Protection of your PHP OAuth Client Application Against User Account Leaks

Updated on: 2016-09-19

Posted on:

When your application needs to call an API with tokens obtained using OAuth, if your application OAuth credentials are stolen, it becomes a security problem that may cause you big headaches.

Read this tutorial to learn about good security practices to minimize the possible damages to your application if your developer user account details in the API site get stolen.


Blog More ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)

10. Is Your PHP Application Vulnerable to the HTTPoxy Security Exploit?

Updated on: 2016-07-21

Posted on:

Recently it was disclosed a security vulnerability called HTTPoxy in Web applications of different languages can be used to perform serious man-in-the-middle attacks (MITM) and disclose sensitive information.

Read this article to learn what is the HTTPoxy vulnerability and how to check if your Web applications are vulnerable.


Blog More ...   Post a comment Post a comment   See comments See comments (2)   Trackbacks (0)

9. Get Twitter Direct Message Images in PHP with the OAuth API

Updated on: 2015-12-10

Posted on:

Twitter API allows applications to access users' direct messages but if you want to download images or other media associated with those direct messages, there is no specific API call to do so.

Direct messages are private, so there is no public URL to access the direct messages' images without using OAuth or you are a real logged user accessing Twitter via a browser.

Read this article to learn how to download images that belong to direct messages using authenticated requests with this PHP OAuth client class.


Blog More ...   Post a comment Post a comment   See comments See comments (3)   Trackbacks (0)

7. How to Check if an OAuth Token is Valid?

Updated on: 2015-03-09

Posted on:

Some Web applications need to show different information to users depending on whether they have authorized API access using OAuth and if the access token is still valid, like for instance showing a login button or not. Read this article to learn about solutions for this problem.

Blog More ...   Post a comment Post a comment   See comments See comments (9)   Trackbacks (0)

6. OAuth Pin Based Authorization for Twitter, LinkedIn, Imgur and Others

Updated on: 2015-01-18

Posted on:

Some applications need to access OAuth based APIs but since they are not based on regular Web browsers, they need to need to use an alternative method to obtain the user authorization.

Pin based authorization is a method used for instance by applications based on the command line, desktop applications, embedded systems, game consoles, and certain types of mobile apps.

Read this article to learn how the pin based OAuth authorization process works and how can you implement it in your applications using the PHP OAuth API class.


Blog More ...   Post a comment Post a comment   See comments See comments (1)   Trackbacks (0)

5. 4 Ways to Access an API using OAuth Without User Interaction - OAuth2 Automatic Login with Facebook, Google or Any Other API

Updated on: 2017-04-26

Posted on:

OAuth is a protocol used to access APIs on behalf of an user but the user does not need to be present when the API is accessed.

There are even ways that allow applications to access APIs using tokens obtained without any user intervention, thus allowing greater application automation.

Read this article to learn about several ways to access a OAuth based API without the user presence to access OAuth2 based APIs like Facebook, Google, Google Drive, Gmail, Blogger Blogspot, Twitter, Magento, Salesforce, etc...


Blog More ...   Post a comment Post a comment   See comments See comments (8)   Trackbacks (0)


  14 - 5   4 - 1  
  All package blogs All package blogs   PHP OAuth Library PHP OAuth Library   Blog PHP OAuth Library package blog   Post article Post article