A Universally Unique Identifier (UUID) is a 128-bit name used for a unique label you can generate.

This is also referred to as a GUID – Globally Unique Identifier.

Generating a UUID means you will be returned a very unique identifier string which you can use for many cases, like player IDs and other strings or values that need to be completely unique and there’s no risk of duplication.

Whilst the risk of duplication is not impossible, it’s very highly improbable due to the variation of strings generated.

How to Generate a UUID

Simply GET this URL

https://gamipixel.com/api/v1/gami-uuid-generator

Don’t forget to send your api_key and authentication_key as POST$.

This will generate and return a unique identifier to you in JSON:

{
    "uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

or delimited:

uuid:f47ac10b-58cc-4372-a567-0e02b2c3d479

Additional Arguments

By default, version 4 is used. However, you can send an additional POST$ argument to specify version 1, 2 or 3 to be used instead.

version=v3

Code Examples

Here are some coding examples for you.

C# (Unity)

using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        var apiKey = "your_api_key";
        var authKey = "your_authentication_key";
        var version = "v4";  // Optional
        var delimited = "yes";  // Optional

        using (var client = new HttpClient())
        {
            var values = new Dictionary<string, string>
            {
                { "api_key", apiKey },
                { "authentication_key", authKey },
                { "version", version },
                { "delimited", delimited }
            };

            var content = new FormUrlEncodedContent(values);
            var response = await client.PostAsync("https://gamipixel.com/api/v1/gami-uuid-generator", content);
            var responseString = await response.Content.ReadAsStringAsync();

            Console.WriteLine(responseString);
        }
    }
}

C++ (Unreal Engine) (cURL)

#include <iostream>
#include <string>
#include <curl/curl.h>

int main() {
    CURL *curl;
    CURLcode res;
    curl = curl_easy_init();

    if (curl) {
        curl_easy_setopt(curl, CURLOPT_URL, "https://gamipixel.com/api/v1/gami-uuid-generator");

        std::string postData = "api_key=your_api_key&authentication_key=your_authentication_key&version=v4&delimited=yes";

        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postData.c_str());

        res = curl_easy_perform(curl);

        if (res != CURLE_OK) {
            fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
        }

        curl_easy_cleanup(curl);
    }

    return 0;
}

JavaScript (fetch)

const apiKey = "your_api_key";
const authKey = "your_authentication_key";
const version = "v4";  // Optional
const delimited = "yes";  // Optional

const data = new URLSearchParams({
    api_key: apiKey,
    authentication_key: authKey,
    version: version,
    delimited: delimited
});

fetch("https://gamipixel.com/api/v1/gami-uuid-generator", {
    method: "POST",
    body: data,
    headers: {
        "Content-Type": "application/x-www-form-urlencoded"
    }
})
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));

LUA (HTTP Library)

local http = require("socket.http")
local ltn12 = require("ltn12")

local apiKey = "your_api_key"
local authKey = "your_authentication_key"
local version = "v4"  -- Optional
local delimited = "yes"  -- Optional

local response_body = {}

local res, code, response_headers = http.request{
    url = "https://gamipixel.com/api/v1/gami-uuid-generator",
    method = "POST",
    headers = {
        ["Content-Type"] = "application/x-www-form-urlencoded",
        ["Content-Length"] = tostring(#postData)
    },
    source = ltn12.source.string("api_key=" .. apiKey .. "&authentication_key=" .. authKey .. "&version=" .. version .. "&delimited=" .. delimited),
    sink = ltn12.sink.table(response_body)
}

print(table.concat(response_body))

Python (requests)

import requests

api_key = "your_api_key"
auth_key = "your_authentication_key"
version = "v4"  # Optional
delimited = "yes"  # Optional

data = {
    "api_key": api_key,
    "authentication_key": auth_key,
    "version": version,
    "delimited": delimited
}

response = requests.post("https://gamipixel.com/api/v1/gami-uuid-generator", data=data)
print(response.text)