Insidethe.com

Insidethe.com

Random Life and Technology Bits

Line2 Windows Desktop App Can’t Access Google Contacts

If you are a Google Apps customer and want to use the Line2 Windows Desktop App with your Google Contacts you may get one of these errors when the Line2 Desktop App tries to authenticate with your Google Account:

Error 401: disabled_client
Error 400: admin_policy_enforced

This is caused because the Windows Application doesn’t have access to your Google Apps account. To resolve this and grant the Line2 app access:

  1. Go to your Google Apps Console Security > API Controls page.
  2. Click Manage Third-Party App Access.
  3. Look for Line2 in the list of connected apps and click Change Access to grant it access to your Google Account.
    JVIS 9-9-2021 10.32.52 AM jared SNAG- 0027
  4.  Once access has been granted go to the Line2 Desktop app and link your contacts list to your Google Contacts list.

Tip: If the app doesn’t appear in the list you may be able to use the Configure New App option and using the client_id value in the Authorization Error message from Google locate the app and add it to the list.

RegEx To Find Lines Containing Text and Exclude Matches Containing Text

 

This is an example of how to do a find in files with PhpStorm or WebStorm but exclude lines matching a specific string.

For example, give this code below, we want to find all lines that contain the http://example.com/api but do not also contain the string ‘some_variable’

$my_url = variable_get("some_variable", "http://example.com/api");
...
$my_url = 'http://example.com/api';

The RegEx pattern will find all lines that contain the URL but exclude the lines with the specified text:

^(?!.*some_variable.*$).*(http:\/\/example.com\/api)

This should work in any JetBrains editor which supports Java regular expressions.