Gooe.ai API Integration Guide

1. Overview

Gooe.ai provides a simple and direct API to create short links programmatically from your app or website. All you need is to call the API endpoint with the original URL and your personal API token to receive a short link.

2. How to Get Your API Token

Login to your gooe.ai account and go to the Settings page where you will find your API token. Copy and use it in all your requests.

3. Request Details

Send your request using GET method to the following endpoint:

https://gooe.ai/api/shortcut

You must provide the following parameters:

  • url - The original URL you want to shorten
  • token - Your API token

4. PHP Example

<?php
$url = 'https://gooe.ai/api/shortcut/?url=' . urlencode('https://example.com') . '&token=your_token_here';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>

5. JavaScript Example

fetch("https://gooe.ai/api/shortcut/?url=https://example.com&token=your_token_here")
  .then(response => response.text())
  .then(data => {
    console.log("Shortened Link:", data);
  })
  .catch(error => {
    console.error("Error:", error);
  });

6. Python Example

import requests

params = {
    "url": "https://example.com",
    "token": "your_token_here"
}

response = requests.get("https://gooe.ai/api/shortcut", params=params)

if response.status_code == 200:
    print("Shortened URL:", response.text)
else:
    print("Error:", response.status_code)

7. Expected Response

// عند النجاح
https://gooe.ai/abc12

// أو عند وجود خطأ
Missing URL or Token
Invalid token

8. Support

For any technical inquiries or issues, please contact us