SDKs & libraries
Currently, we have SDKs available for the following languages:
TypeScript
PHP
Java
Python
Ruby
Elixir
C#/.NET
Go
Lob's TypeScript SDK can be installed through NPM:
$ npm i @lob/lob-typescript-sdk
To build and install from the latest source:
$ git clone [email protected]:lob/lob-typescript-sdk.git
$ npm install
The recommended way to install lob-php is through Composer.
Install Composer
curl -sS https://getcomposer.org/installer | php
Add Lob.com PHP client as a dependency
composer require lob/lob-php
After installing, you need to require Composer's autoloader:
require 'vendor/autoload.php';
Include the following in your pom.xml for Maven:
<dependencies>
<dependency>
<groupId>com.lob</groupId>
<artifactId>lob-java</artifactId>
<version>13.0.0</version>
</dependency>
...
</dependencies>
Gradle:
compile 'com.lob:lob-java:13.0.0'
You can use pip to install the package:
pip install lob
To initialize the wrapper, import lob and set the api_key:
import lob
lob.api_key = 'your-api-key'
The package can be installed by adding :lob_elixir to your list of dependencies in mix.exs:
def deps do
[
{:lob_elixir, "~> 1.5.0"}
]
end
Don’t see your favorite language?
Address Elements works by targeting the input elements of your address form and using their values with Lob's verification and autocomplete functionality.
JavaScript
React
Registration
Create an account at Lob.com to obtain a Live Public API Key. The key is available in the Lob settings panel and uses the format,
live_pub_*
.
Usage
Embed the Lob Address Elements script immediately before the closing tag in the HTML containing your address form. The script will autodetect your form and its inputs.
<script src="https://cdn.lob.com/lob/address-elements/2.2.1/address-elements.min.js" data-lob-key="live_pub_xxx">
This is a very lightweight component that uses the Lob Autocomplete API in order to simplify the process of adding in a search autocomplete bar or form. Check out the Autocomplete API for more configuration options in Lob documentation.
Installation
npm install --save @lob/react-address-autocomplete
