Développeurs
Build amazing integrations with our powerful API
Documentation
v1.1This documentation explains how to register, configure, and develop your app so you can successfully use our APIs. Follow the steps below to get started with building your integration.
Créer une application
Pour que votre application puisse accéder à nos API, vous devez enregistrer votre application à l’aide du bouton Tableau de bord de l’application. Registration creates an App ID that lets us know who you are and helps us distinguish your app from other apps.
-
Create a new App from the dashboard
Créer une nouvelle application -
Once you created your App you will receive your credentials:
app_id app_secret
Connectez-vous avec
Log in With system is a fast and convenient way for people to create accounts and log into your app. It enables two scenarios: authentication and asking for permissions to access people's data.
-
Direct users to the OAuth login page using this link:
HTML<a href="https://scriptstribe.com/api/oauth?app_id=YOUR_APP_ID"> Log in With ScriptsTribe </a>The user will be redirected to the Log in With page:
-
Once the user accepts your app, they will be redirected to your Redirect URL with an auth_key:
URLhttps://yourdomain.com/callback.php?auth_key=AUTH_KEYNote: The auth_key is valid for one-time use only. Once used, you'll need to redirect the user through the OAuth flow again.
Jeton d’accès
After receiving the auth_key, exchange it for an access_token to make API requests.
-
Make an HTTP POST request to the authorize endpoint:
PHP<?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $auth_key = $_GET['auth_key']; $postData = [ 'app_id' => $app_id, 'app_secret' => $app_secret, 'auth_key' => $auth_key ]; $ch = curl_init('https://scriptstribe.com/api/authorize'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); $response = curl_exec($ch); if (curl_errno($ch)) { die('cURL error: ' . curl_error($ch)); } curl_close($ch); $json = json_decode($response, true); if (!empty($json['access_token'])) { $access_token = $json['access_token']; } ?>Note: The access_token is valid for 1 hour. After expiration, redirect the user through OAuth again.
API Endpoints
With your access_token, you can now make API requests:
Retrieve authenticated user information
Example request:
$response = file_get_contents(
"https://scriptstribe.com/api/get_user_info?access_token=" . $access_token
);
$userData = json_decode($response, true);
Response:
{
"user_info": {
"user_id": "123",
"user_name": "johndoe",
"user_email": "john@example.com",
"user_firstname": "John",
"user_lastname": "Doe",
"user_gender": "male",
"user_birthdate": "1990-01-15",
"user_picture": "https://...",
"user_cover": "https://...",
"user_registered": "2024-01-01",
"user_verified": "1",
"user_relationship": "single",
"user_biography": "Hello world!",
"user_website": "https://johndoe.com"
}
}