Get OAuth Credentials for a Web Application

Learn to get OAuth credentials for a web application and to use them to get user information.

This lesson covers how to create your OAuth 2.0 client for a web application. This provides you with the OAuth credentials that enable you to generate the access token.

Create the OAuth 2.0 client

Step 1: From the left menu bar, click the "Credentials" option.

Step 2: On the "Credentials" page, click "CREATE CREDENTIALS" from the top menu bar. Select the "OAuth client ID" option from the dropdown menu. This time, you're redirected to the "Create OAuth client ID" page where you're asked to enter the following information.

  • Application type: Select the "Web application" option from the dropdown menu.
  • Name: This is the name of your OAuth 2.0 client. This name is only be used to identify the client in the console and isn’t shown to the end users.
  • Authorized JavaScript origins: These refer to the HTTP origins that host your web application. Please note that this value can’t contain wildcards or paths. Moreover, you must specify the port number along with the URI in case you’re using a port other than `80`. For your application, this port number is already given in the widget below.

Get hands-on with 1400+ tech skills courses.