SDK Quickstart

Go SDK Quickstart

Install github.com/xidioda/khaleejiapi-go, configure your API key, and make your first authenticated API call.

1) Install

bash
go get github.com/xidioda/khaleejiapi-go

2) Environment variable setup

bash
export KHALEEJI_API_KEY=your_api_key_here

3) Minimal working example

go
package main
import (
"context"
"fmt"
"os"
khaleeji "github.com/xidioda/khaleejiapi-go"
)
func main() {
apiKey := os.Getenv("KHALEEJI_API_KEY")
client := khaleeji.New(apiKey)
result, err := client.Validation.ValidateEmail(context.Background(), "[email protected]")
if err != nil {
panic(err)
}
fmt.Println(result.Valid)
}

Next steps

Test your key with a real endpoint from the API reference.

Use retries/rate-limit handling for production workloads.

Review authentication and rate limits before going live.