Skip to main content
All CollectionsCustomer Center
LocaliQ : CRM Integration Add-On
LocaliQ : CRM Integration Add-On
CustomerCenter avatar
Written by CustomerCenter
Updated this week

When you have your own CRM platform and would like to streamline lead information to one place, LocaliQ has two options:

  • DIY (Do It Yourself) - Learn More

  • DIFM (Do It For Me - process charges apply)

There are THREE ways to connect Customer Center data to your CRM database.

  1. API - DIY & DIFM

  2. Webhook - DIY only

  3. Direct Integration - DIY or DIFM

API - systems exchange data using a “request and response” method; most “real-time”

Webhook - systems exchange data using a “push” method whenever a lead occurs.

Direct Integration - systems exchange data by direct integration (through Zapier®)


Getting Started

We have a two-step access process; authentication and authorization.

  • The authentication process registers your application to a business user email.

  • The authorization process determines the advertising data the business user is allowed to access.

Step 1: Request API Access

  • You will get a response within 1 business day and the response email will contain a Client ID and a Client Secret token.

  • The Client ID token is a public identifier for your application that will differentiate it from other LocaliQ API integrations.

  • The Client Secret token is known only to the application and the authorization server.

Step 2: Authorization/Authentication

The second step involves receiving an Authorization token, which is then used to request an Access and Refresh token. There are two ways to receive an Authorization token:

  • User login method and

  • Direct access method


Get Authorization/Authentication Token

User Login Method

Through a browser initiate the authorization with your Client ID and Client Secret tokens [Step 1 above] and your REDIRECT_URI (the redirect URI is where all API-related responses will be sent)

https://api.localiqservices.com/oauth/authorize?client_id=[CLIENT_ID]&response_type=code&redirect_uri=[REDIRECT_URI]

Please enter your business user credentials

The user (login email) being used for API authentication must be a business user in the LocaliQ platform and have access to the account(GMAID) that will be used in the API.

Upon successful authentication, you will be redirected to the REDIRECT_URI along with an Authorization token. This token expires in 10 minutes.

Get Access and Refresh Tokens

Please use the Authorization token to request an Access and Refresh token.

curl -X POST \ https://api.localiqservices.com/oauth/token \ -H 'content-type: application/json' \ -d '{ "client_id": "CLIENT_ID", "client_secret": "CLIENT_SECRET", "code": "AUTHORIZATION_TOKEN", "grant_type": "authorization_code", "redirect_uri": "REDIRECT_URI" }'

The above command returns JSON structured like this:

{ "access_token": "8821d2a47a88d1cbaced1043aee73ccc4608d7cacb068c0eb09e468e91cdb49b", "token_type": "bearer", "expires_in": 7200, "refresh_token": "5d59deea16599eb316a63989a9974568da4f5570e7ef9969c693f0b1ce1052cb", "created_at": 1495549720 }

Direct Access Method

Another way to get the Authorization, Access and Refresh tokens today is to use the direct access approach. OAuth 2 provides a "password" grant type which can be used to exchange your business user credentials for an Access token directly. This method is easier to use for straight API integrations where user interaction isn't desired or possible.

Replace the CLIENT_ID, CLIENT_SECRET, USERNAME and PASSWORD with the correct values for your account.

Request New Access Token

  • The Access token should be passed in the authorization header for all API requests. This Access token expires every 2 hours. If the token has expired, all API calls will receive a 401 HTTP status code response.

  • You can request a new Access token by using the Refresh token. It is very important that you save the Refresh token for this purpose. If your Refresh token is lost, you would have to authenticate and authorize again [Step 1 and Step 2] to obtain a new Access token and Refresh token.

Security Considerations

Token Security

Refresh tokens are long-lived. This means you must store it securely to keep it from being used by potential attackers. For this reason, it is not safe to store them in the browser. If a Refresh token is leaked, it may be used to obtain new Access tokens (and access protected resources) until it is blacklisted. Access tokens must also be kept secret, but due to its shorter life, security considerations are less critical.

The email address used to obtain the OAuth Access token must be associated with the account(GMAID) of the requested advertiser. If it is not, the API will return an HTTP response with status code 403 and the following body:

{ "name": "not_authorized", "message": "You are not permitted to perform this action." }

Business user credentials

The user (login email) being used for API authentication must be a business user in the LocaliQ platform and have access to the account(GMAID) that will be used in the API. Business User credentials are provided by your account team during account creation. These credentials allow you to access the account data through the APIs as well as the Customer Center. If you need to check if you have a Business User created or need to reset your password, you can navigate to ReachSecurePay (https://reachsecurepay.com/client/index.php) and enter your email address. If you encounter the error message “Email Address is invalid” or “Email Address not found”, please contact your account management team. If you progress to the login screen, you can select “Create a new password” which will either send you a password reset email or allow you to set your password manually (this will only occur if your password has never been set).

Access to HIPAA data

The business user must have an “Agency Customer” role to use the lead APIs. If the API response has PII and the advertiser falls under the HIPAA category, the API will check for this role to provide PII information in the response. Please reach your account team to check and/or edit privileges on your business user. Please follow the needed due diligence when adding HIPAA privileges to your business user account since the implications of it are far beyond API access to data. This control applies to APIs that provide data that are classified as HIPAA and protected by law.

API Rate Limits

LocaliQ enforces API rate limits for its REST APIs. Rate limit configuration consists of a per-second request limit. Limits are set to 20 requests/second.

If you exceed the rate limit allowance, your request will be rejected. A HTTP 429 (Too Many Requests)​ response will be returned. Clients must back off until the end of the current rate limit window before making any more requests.

Example response body for throttled request:

{ "message": "Too Many Requests" }

We reserve the right to alter rate limits and other functionality to prevent abuse, spam, denial-of-service attacks, or other security issues. Where possible, we'll return a descriptive error message, but the nature of this type of rate limiting often prevents us from providing more information.

Troubleshooting Errors

400 - Bad Request - Invalid Grant

Example Response

{ "error": "invalid_grant", "error_description": "The provided authorization credentials are invalid. Refer to documentation at https://doc.api.localiq.com/#error-codes for further information." }

Invalid grant error messages occurs when either:

  • A request is made for an access token with invalid credentials (username or password)

  • When a request is made to refresh an access token with an expired refresh token, one that has already been used to obtain an access token so it is no longer valid.

To resolve this check your username and password for accuracy, then follow steps at Requesting Access and Refresh Tokens to request a new refresh token.

401 - Unauthorized

Example Response

{ "message": "Unauthorized" }

Unauthorized messages can occur when a request for a report endpoint is made using an expired token. To resolve this, follow steps at Requesting Access and Refresh Tokens

403 - Forbidden - HIPAA Permissions

Example Response

{ "name": "not_authorized", "message": "You are not permitted to perform this action." }

The business user must be set up to allow access to HIPAA information to access HIPAA data through the API. You can reach your account team to check and/or edit privileges on your business user. Please follow the needed due diligence when adding HIPAA privileges to your business user account since the implications of it are far beyond API access to data. This control applies to APIs that provide data that are classified as HIPAA and protected by law. The business user must have "Agency Customer" role to use the lead APIs. If the API response has PII and the advertiser falls under the HIPAA category, the API will check for this role to provide PII information in the response.

Did this answer your question?