(Lookup)
Retrieve up-to-date metadata about a specific phone number
- Lookup - Look up for phone number
Look up for phone number
package main
import(
dinggolang "github.com/ding-live/ding-golang"
"context"
"log"
)
func main() {
s := dinggolang.New(
dinggolang.WithSecurity("YOUR_API_KEY"),
)
ctx := context.Background()
res, err := s.Lookup.Lookup(ctx, "6e93aa15-9177-4d09-8395-b69ce50db1c8", "<value>")
if err != nil {
log.Fatal(err)
}
if res.LookupResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
customerUUID |
string | ✔️ | N/A |
phoneNumber |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.LookupResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.ErrorResponse | 400 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |