Integration Guide
Master the integration of منصة استقل للإعلانات وخدمات السيو into your digital ecosystem with step-by-step instructions and code samples.
Developer Platform
Information
Define your application name, domain, and redirect URIs in the developer dashboard to receive your unique Client ID and Secret.
Info: Prepare your public domain, callback URLs, and requested scopes before submitting the app for review.
Implement the Authorization Code flow to allow members to securely grant access to their data and identity.
Redirect the user to the authorization endpoint. The user will be prompted to grant the requested permissions.
GET https://ads.estaql.com/oauth/authorize?
client_id=YOUR_CLIENT_ID&
redirect_uri=https://yourapp.com/callback&
response_type=code&
scope=user.identity.read%20user.profile.read&
state=RANDOM_CSRF_STATE
Once authorized, the user is redirected back to your redirect_uri with a code query parameter. Exchange this code via a secure server-to-server POST request:
POST https://ads.estaql.com/oauth/token
Content-Type: application/json
{
"grant_type": "authorization_code",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"redirect_uri": "https://yourapp.com/callback",
"code": "AUTHORIZATION_CODE"
}
{
"access_token": "def50200a87...",
"refresh_token": "def50200b92...",
"expires_in": 3600,
"token_type": "Bearer"
}
Provide the access token in the Authorization: Bearer {access_token} HTTP header on all API requests:
GET https://ads.estaql.com/api/developer/v1/me HTTP/1.1
Host: ads.estaql.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Use our comprehensive code samples to connect your backend or embed interactive widgets directly into your site.
<?php
$clientId = 'YOUR_CLIENT_ID';
$clientSecret = 'YOUR_CLIENT_SECRET';
$code = $_GET['code']; // Code received from authorization redirect
// 1. Exchange code for access token
$ch = curl_init('https://ads.estaql.com/oauth/token');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'grant_type' => 'authorization_code',
'client_id' => $clientId,
'client_secret' => $clientSecret,
'redirect_uri' => 'https://yourapp.com/callback',
'code' => $code
]);
$response = json_decode(curl_exec($ch), true);
$accessToken = $response['access_token'];
// 2. Fetch authenticated member identity
$ch = curl_init('https://ads.estaql.com/api/developer/v1/me');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $accessToken,
'Accept: application/json'
]);
$user = json_decode(curl_exec($ch), true);
print_r($user);
?>
const axios = require('axios');
async function authenticateAndFetchUser(authCode) {
// 1. Exchange authorization code for token
const tokenResponse = await axios.post('https://ads.estaql.com/oauth/token', {
grant_type: 'authorization_code',
client_id: 'YOUR_CLIENT_ID',
client_secret: 'YOUR_CLIENT_SECRET',
redirect_uri: 'https://yourapp.com/callback',
code: authCode
});
const accessToken = tokenResponse.data.access_token;
// 2. Call Developer API v1 endpoint
const userResponse = await axios.get('https://ads.estaql.com/api/developer/v1/me', {
headers: {
'Authorization': `Bearer ${accessToken}`,
'Accept': 'application/json'
}
});
return userResponse.data.data;
}
import requests
def get_user_profile(auth_code):
# 1. Exchange code for access token
token_url = 'https://ads.estaql.com/oauth/token'
payload = {
'grant_type': 'authorization_code',
'client_id': 'YOUR_CLIENT_ID',
'client_secret': 'YOUR_CLIENT_SECRET',
'redirect_uri': 'https://yourapp.com/callback',
'code': auth_code
}
token_res = requests.post(token_url, data=payload)
access_token = token_res.json().get('access_token')
# 2. Call Developer API v1
api_url = 'https://ads.estaql.com/api/developer/v1/me'
headers = {
'Authorization': f'Bearer {access_token}',
'Accept': 'application/json'
}
user_res = requests.get(api_url, headers=headers)
return user_res.json()
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using System.Collections.Generic;
public async Task<string> GetUserProfile(string authCode) {
using var client = new HttpClient();
// 1. Exchange code for token
var parameters = new Dictionary<string, string> {
{ "grant_type", "authorization_code" },
{ "client_id", "YOUR_CLIENT_ID" },
{ "client_secret", "YOUR_CLIENT_SECRET" },
{ "redirect_uri", "https://yourapp.com/callback" },
{ "code", authCode }
};
var content = new FormUrlEncodedContent(parameters);
var tokenResponse = await client.PostAsync("https://ads.estaql.com/oauth/token", content);
var tokenJson = await tokenResponse.Content.ReadAsStringAsync();
// Parse accessToken from tokenJson ...
string accessToken = "EXTRACTED_ACCESS_TOKEN";
// 2. Call Developer API v1
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var userResponse = await client.GetAsync("https://ads.estaql.com/api/developer/v1/me");
return await userResponse.Content.ReadAsStringAsync();
}
# 1. Exchange authorization code for token
curl -X POST https://ads.estaql.com/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=authorization_code" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "code=AUTHORIZATION_CODE" \
-d "redirect_uri=https://yourapp.com/callback"
# 2. Call Developer API v1 with Bearer token
curl -X GET https://ads.estaql.com/api/developer/v1/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Accept: application/json"
كتالوج شامل لكافة نقاط نهاية REST API v1 المتاحة مع المعاملات والصلاحيات المطلوبة.
All requests require the Authorization: Bearer {token} header and are rate-limited to 30 requests per minute.
Read the member account identifier and basic public identity fields.
Read public profile details and core member metadata.
الوصول إلى عنوان البريد الإلكتروني الموثق لحساب المستخدم.
Read the public social links attached to a member profile.
Read follower and following relationships for visible members.
متابعة أو إلغاء متابعة أعضاء آخرين نيابة عن المستخدم.
{"target_user_id": 123, "action": "follow|unfollow|toggle"}
قراءة منشورات وتحديثات الحالة العامة للمستخدم.
إنشاء وتعديل ونشر التحديثات والمنشورات نيابة عن المستخدم.
{"content": "Post text", "privacy": "public|followers|private"}
إضافة وإلغاء التفاعلات والإعجابات على المنشورات نيابة عن المستخدم.
{"status_id": 123}
قراءة محادثات وصندوق الرسائل الخاصة التابعة للمستخدم.
إرسال رسائل خاصة مباشرة نيابة عن المستخدم.
{"receiver_id": 123, "content": "Message body"}
قراءة إشعارات وتنبيهات الحساب وعدد التنبيهات غير المقروءة.
قراءة رصيد النقاط والمحفظة المالية الخاصة بحساب المستخدم.
قراءة أوسمة العضو وإنجازاته المكتسبة وحالة التحديات.
تصفح مقاطع الفيديو القصيرة والمقاطع المحفوظة في حساب العضو.
قراءة أقسام المنتدى والمواضيع والنقاشات والردود.
تصفح قائمة المنتجات والخدمات المعروضة في المتجر وقاعدة المعرفة.
قراءة سجل طلبات الشراء والعروض المقدمة الخاصة بالمستخدم.
قراءة إحصائيات ظهور الإعلانات والنقرات وأداء الحملات الإعلانية.
Read the authorized owner profile through the developer API.
Read the authorized owner content feed and published updates.
Follow or unfollow members on behalf of the authorized owner.
Send private messages on behalf of the authorized owner.
{"content": "Message text"}
أذونات وصلاحيات دقيقة تطلبها التطبيقات الخارجية أثناء عملية مصادقة OAuth.
| Category | Scope Identifier | Description | Type |
|---|---|---|---|
| Identity |
user.identity.read
|
Read the member account identifier and basic public identity fields. | صلاحية قياسية |
| Identity |
user.profile.read
|
Read public profile details and core member metadata. | صلاحية قياسية |
| Identity |
user.email.read
|
الوصول إلى عنوان البريد الإلكتروني الموثق لحساب المستخدم. | صلاحية حساسة |
| Identity |
user.social_links.read
|
Read the public social links attached to a member profile. | صلاحية قياسية |
| Identity |
user.follows.read
|
Read follower and following relationships for visible members. | صلاحية قياسية |
| Identity |
user.follows.write
|
متابعة أو إلغاء متابعة أعضاء آخرين نيابة عن المستخدم. | صلاحية حساسة |
| Content |
user.content.read
|
قراءة منشورات وتحديثات الحالة العامة للمستخدم. | صلاحية قياسية |
| Content |
user.content.write
|
إنشاء وتعديل ونشر التحديثات والمنشورات نيابة عن المستخدم. | صلاحية حساسة |
| Content |
user.reactions.write
|
إضافة وإلغاء التفاعلات والإعجابات على المنشورات نيابة عن المستخدم. | صلاحية قياسية |
| Content |
user.comments.write
|
نشر تعليقات وردود على المنشورات نيابة عن المستخدم. | صلاحية حساسة |
| Messaging |
user.messages.read
|
قراءة محادثات وصندوق الرسائل الخاصة التابعة للمستخدم. | صلاحية حساسة |
| Messaging |
user.messages.write
|
إرسال رسائل خاصة مباشرة نيابة عن المستخدم. | صلاحية حساسة |
| Messaging |
user.notifications.read
|
قراءة إشعارات وتنبيهات الحساب وعدد التنبيهات غير المقروءة. | صلاحية قياسية |
| Economy |
user.wallet.read
|
قراءة رصيد النقاط والمحفظة المالية الخاصة بحساب المستخدم. | صلاحية حساسة |
| Economy |
user.badges.read
|
قراءة أوسمة العضو وإنجازاته المكتسبة وحالة التحديات. | صلاحية قياسية |
| Community |
user.clips.read
|
تصفح مقاطع الفيديو القصيرة والمقاطع المحفوظة في حساب العضو. | صلاحية قياسية |
| Community |
user.clips.write
|
حفظ وإلغاء حفظ مقاطع الفيديو القصيرة نيابة عن المستخدم. | صلاحية قياسية |
| Community |
user.forums.read
|
قراءة أقسام المنتدى والمواضيع والنقاشات والردود. | صلاحية قياسية |
| Community |
user.forums.write
|
إنشاء مواضيع جديدة ونشر الردود في أقسام المنتدى نيابة عن المستخدم. | صلاحية حساسة |
| Commerce |
user.store.read
|
تصفح قائمة المنتجات والخدمات المعروضة في المتجر وقاعدة المعرفة. | صلاحية قياسية |
| Commerce |
user.orders.read
|
قراءة سجل طلبات الشراء والعروض المقدمة الخاصة بالمستخدم. | صلاحية حساسة |
| Commerce |
user.ads.read
|
قراءة إحصائيات ظهور الإعلانات والنقرات وأداء الحملات الإعلانية. | صلاحية قياسية |
| Owner |
owner.profile.read
|
Read the authorized owner profile through the developer API. | صلاحية قياسية |
| Owner |
owner.content.read
|
Read the authorized owner content feed and published updates. | صلاحية قياسية |
| Owner |
owner.follow.write
|
Follow or unfollow members on behalf of the authorized owner. | صلاحية حساسة |
| Owner |
owner.messages.read
|
Read private message conversations that belong to the authorized owner. | صلاحية حساسة |
| Owner |
owner.messages.write
|
Send private messages on behalf of the authorized owner. | صلاحية حساسة |
Embed our widgets on your website to show your منصة استقل للإعلانات وخدمات السيو profile, content, or a follow button.
Embed an interactive button allowing visitors to follow your profile on MYADS with a single click.
<div id="myads-widget-follow-YOUR_APP_ID"></div>
<script src="https://ads.estaql.com/embed/developer/YOUR_APP_ID/follow.js"></script>
Display your verified badge, avatar, bio, follower count, and stats on your website.
<div id="myads-widget-profile-YOUR_APP_ID"></div>
<script src="https://ads.estaql.com/embed/developer/YOUR_APP_ID/profile.js"></script>
Showcase your latest public posts and status updates dynamically inside your web application.
<div id="myads-widget-content-YOUR_APP_ID"></div>
<script src="https://ads.estaql.com/embed/developer/YOUR_APP_ID/content.js"></script>
Use the Share API to pre-fill the post composer with text and links.
https://ads.estaql.com/share?text=Check+out+this+article!+https://example.com
طلبات الـ API محددة بـ 30 طلباً في الدقيقة لكل عنوان IP. يجب الحفاظ على سرية رموز Bearer.
429 Too Many Requests.
success, message, and data fields:
{
"success": true,
"message": "Operation completed successfully.",
"data": { ... }
}
Accept-Language: ar or Accept-Language: en in request headers to receive localized responses and validation messages.
Bestätigen
Sind Sie sicher, dass Sie löschen möchten?