ربط حسابك
لديك حساب EQVPS وتريد أن يستخدمه سكربت أو وكيل: احصل على رمز، وضعه في الإعداد، وشغّل أول بيئة اختبار، وحافظ على الرصيد مشحونًا.
كيف يترابط كل شيء
1. احصل على رمز
الأسهل: افتح في لوحة التحكم الإعدادات ← رموز API، وأنشئ رمزًا (سمّه باسم الوكيل واختر مدة صلاحية) وانسخه. يظهر مرة واحدة فقط.
من سطر الأوامر: سجّل الدخول بالبريد وكلمة المرور لتحصل على رمز جديد. إذا سجّلت برمز عبر البريد ولم تضع كلمة مرور قط، فضع واحدة مرة واحدة باستخدام رمز من لوحة التحكم. ويمكنك أيضًا إنشاء حساب جديد عبر POST /auth/register، الذي يعيد رمزًا فورًا.
# log in with email + password → token
curl -s https://api.eqvps.com/api/v1/eqvps/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","password":"your-password"}'
# → {"token":"eyJ0…","token_type":"Bearer","token_expires_at":"2027-10-03T…","user":{…}}
# signed up with an email code and have no password? set one once
# (authorise with a token from Settings → API tokens)
curl -s https://api.eqvps.com/api/v1/eqvps/auth/set-password \
-H "Authorization: Bearer $EQVPS_API_KEY" -H "Content-Type: application/json" \
-d '{"password":"new-pass-123","password_confirmation":"new-pass-123"}'
# no account yet: register straight from the API (password is optional)
curl -s https://api.eqvps.com/api/v1/eqvps/auth/register \
-H "Content-Type: application/json" -d '{"email":"you@example.com"}'
# extend a token before it expires
curl -s -X POST https://api.eqvps.com/api/v1/eqvps/auth/token/refresh \
-H "Authorization: Bearer $EQVPS_API_KEY"الرمز صالح لمدة سنة (انظر token_expires_at في الرد). مدّده عبر POST /auth/token/refresh، وألغِ ما لم تعد تستخدمه من الإعدادات.
2. ضعه في الإعداد
أبقِ الرمز خارج الكود: صدّره باسم EQVPS_API_KEY. يستقبله عملاء MCP في ترويسة Authorization.
# shell / CI secret — keep it out of the code
export EQVPS_API_KEY="eyJ0…"
# SDKs read the same variable (0.2.0+: give your code its secrets as env, not in the source)
pip install -U eqvps # Python
npm i @eqvps/sdk@latest # TypeScript / JavaScript
# Claude Code
claude mcp add --transport http eqvps https://mcp.eqvps.com/mcp \
--header "Authorization: Bearer $EQVPS_API_KEY"
# Cursor, Claude Desktop, other MCP clients (mcp.json)
{
"mcpServers": {
"eqvps": {
"type": "streamable-http",
"url": "https://mcp.eqvps.com/mcp",
"headers": { "Authorization": "Bearer <YOUR_TOKEN>" }
}
}
}3. شغّل أول بيئة اختبار
أنشئ، شغّل الكود، احذف. قيمة exit_code غير الصفرية نتيجة عادية لأمرك وليست خطأ HTTP.
API=https://api.eqvps.com/api/v1/eqvps
H="Authorization: Bearer $EQVPS_API_KEY"
SB=$(curl -s -X POST $API/sandboxes -H "$H" -H "Content-Type: application/json" \
-d '{"tariff":"micro"}' | python3 -c 'import sys,json; print(json.load(sys.stdin)["id"])')
curl -s -X POST $API/sandboxes/$SB/run -H "$H" -H "Content-Type: application/json" \
-d '{"language":"bash","code":"uname -sr && python3 --version && node --version"}'
# → {"exit_code":0,"stdout":"Linux 6.1…\nPython 3.12…\nv22…\n","stderr":"",…}
curl -s -X DELETE $API/sandboxes/$SB -H "$H"الأوضاع والباقات وأمثلة Python / Node.js: بيئات الاختبار ←
4. اشحن الرصيد
تُدفع بيئات الاختبار والخوادم من رصيد مسبق الدفع واحد. اشحنه من لوحة التحكم (الرصيد: عملات مشفّرة أو Monero أو رمز ترويجي) أو عبر POST /balance/topup الذي يعيد رابط دفع. ويعرض GET /balance المتبقي.
curl -s $API/balance -H "$H"
# → {"balance":12.4,"currency":"USD","promo_balance":0,"real_balance":12.4,"promo_scope":"sandboxes"}
curl -s -X POST $API/balance/topup -H "$H" -H "Content-Type: application/json" -d '{"amount":10}'
# → {"invoice_id":…,"checkout_url":"https://…"} open the link and pay with cryptoأخطاء ستراها على الأرجح
- 401 Unauthenticated — الرمز مفقود أو فيه خطأ إملائي أو انتهت صلاحيته أو أُلغي. تحقّق من ترويسة Authorization: Bearer، أو أنشئ رمزًا جديدًا في الإعدادات، أو سجّل الدخول من جديد.
- 402 insufficient_balance — الرصيد فارغ، لذا لا تبدأ بيئة جديدة. اشحن الرصيد وكرّر الطلب. البيئات الدائمة العاملة تُوقف مؤقتًا بدل حذفها.
- 429 و503 يعنيان أن الطلب رُفض قبل تشغيل أي شيء: انتظر Retry-After ثم أرسله مجددًا. 409 sandbox_paused: اشحن الرصيد وتستأنف البيئة.
HTTP 401 {"message":"Unauthenticated."}
HTTP 402 {"error":"insufficient_balance","message":"Your balance cannot cover this sandbox. Top up (topup_balance / POST /balance/topup) and retry."}
HTTP 429 {"error":"too_many_concurrent", …} → wait Retry-After, then retry
HTTP 503 {"error":"capacity","retry_after":30, …} → wait Retry-After, then retry
التعليقات
لا تعليقات بعد. كن الأول.