Zig SDK

bash
zig fetch --save git+https://github.com/vine-protocol/zig-sdk#main

Add the dependency module to your build.zig, then initialize vine.Client with an allocator, the auth API base URL, and a server-side API key.

zig
const client = vine.Client.init(allocator, .{
    .base_url = "https://auth-api.vineeid.com",
    .api_key = std.posix.getenv("VINE_API_KEY") orelse return error.MissingApiKey,
});

var result = try client.initFlow(.{
    .vid = "657787756543",
    .request_type = .login,
    .scope = &.{"profile.read"},
});
defer result.deinit();

initFlow, getFlowStatus, and listFlows return allocator-managed values that must be released with deinit(). The client also exposes metrics and notification resend operations.