go-digits is a Go client library for the Digits API. Check the usage section or the examples to learn how to access the Digits API.
- AccountService for getting Digits accounts
- Get verified user phone numbers and email addresses
- ContactService for finding matching contacts ("friends")
- Digits API Client accepts any OAuth1
http.Client
go get github.com/dghubble/go-digits/digits
Read GoDoc
The digits
package provides a Client
for accessing the Digits API. Here is an example request for a Digit user's Account.
import (
"github.com/dghubble/go-digits/digits"
"github.com/dghubble/oauth1"
)
config := oauth1.NewConfig("consumerKey", "consumerSecret")
token := oauth1.NewToken("accessToken", "accessSecret")
// OAuth1 http.Client will automatically authorize Requests
httpClient := config.Client(oauth1.NoContext, token)
// Digits client
client := digits.NewClient(httpClient)
// get current user's Digits Account
account, resp, err := client.Accounts.Account()
The API client accepts any http.Client
capable of signing OAuth1 requests to handle authorization. See the OAuth1 package dghubble/oauth1 for details and examples.
To implement Login with Digits for web or mobile, see the gologin package and examples.
See the Contributing Guide.