{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1383,"path":"api-reference/web-services/t_OAuthDemoCreateProvider.md","title":"OAuth 2.0 tutorial - create an OAuth provider and profile","bundle":null,"doc_type":null,"release":"australia","body":"\n# OAuth 2.0 tutorial - create an OAuth provider and profile\n\nSet up the Google service as an OAuth provider in ServiceNow by entering your client information, Google API URLs, and configuring the OAuth profile.\n\n## Before you begin\n\nYou must have configured the Google service as an OAuth provider and recorded your **Client ID** and **Client Secret** values.\n\nRole required: oauth\\_admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **System OAuth** &gt; **Application Registry**.\n\n2.  Click **New**.\n\n3.  Select **Connect to a third party OAuth Provider**.\n\n4.  Enter a **Name** for the OAuth provider.\n\n    For this example, use `Google`.\n\n5.  Enter the **Client ID** and **Client Secret** that you obtained from Google.\n\n6.  Set the **Default Grant type** to **Authorization Code**.\n\n7.  In the **Authorization URL** field, enter `https://accounts.google.com/o/oauth2/auth`.\n\n8.  In the **Token URL** field, enter `https://www.googleapis.com/oauth2/v3/token`.\n\n9.  In the **Redirect URL** field, enter `https://<instance>.service-now.com/oauth_redirect.do`.\n\n    This URL must match the redirect URL provided to Google.\n\n10. In the **Token Revocation URL** field, enter `https://accounts.google.com/o/oauth2/revoke`.\n\n11. Right-click the form header and select **Save**.\n\n    A new OAuth Entity Profile record is created.\n\n12. In the **OAuth Entity Scopes** embedded list, add a new row with the **Name** and **OAuth scope** values set to `https://www.googleapis.com/auth/contacts.readonly`.\n\n13. Right-click the form header and select **Save**.\n\n14. In the **OAuth Entity Profiles** embedded list, select the automatically-created profile.\n\n15. In the **OAuth Entity Profile Scopes** embedded list, add a new row and select the Google contacts API read-only scope.\n\n16. Click **Update**.\n\n\n**Parent Topic:**[Outbound REST with OAuth 2.0 profile tutorial - integrating with Google Contacts API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/c_OAuth2ProfileTutorialGoogle.md)\n\n**Previous topic:**[OAuth 2.0 tutorial - configure the Google service as an OAuth provider](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/t_OAuthDemoConfigureGoogle.md)\n\n**Next topic:**[OAuth 2.0 tutorial - create a REST message](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/t_OAuthDemoCreateRESTMessage.md)\n\n"}}