Obtenir un jeton marchand
curl --request POST \
--url https://apidjonanko.tech/user/login-merchant \
--header 'Content-Type: application/json' \
--data '
{
"numero": "0700000000",
"password": "••••••••"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({numero: '0700000000', password: '••••••••'})
};
fetch('https://apidjonanko.tech/user/login-merchant', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apidjonanko.tech/user/login-merchant"
payload = {
"numero": "0700000000",
"password": "••••••••"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apidjonanko.tech/user/login-merchant",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'numero' => '0700000000',
'password' => '••••••••'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"access_token": "<jwt>",
"refresh_token": "<string>",
"user": {
"id": "<string>",
"numero": "<string>",
"fullname": "<string>",
"email": "<string>",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userType": "MERCHANT"
}
}{
"statusCode": 404,
"message": "Connexion impossible, vérifiez vos accès ou contactez l'administrateur",
"error": "Not Found"
}Authentification
Obtenir un jeton marchand
Authentifie un marchand avec les identifiants reçus par SMS à la création du compte
(numéro de téléphone + mot de passe) et renvoie un JWT à passer dans l’en-tête
authenticationtoken des endpoints du dashboard.
POST
/
user
/
login-merchant
Obtenir un jeton marchand
curl --request POST \
--url https://apidjonanko.tech/user/login-merchant \
--header 'Content-Type: application/json' \
--data '
{
"numero": "0700000000",
"password": "••••••••"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({numero: '0700000000', password: '••••••••'})
};
fetch('https://apidjonanko.tech/user/login-merchant', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apidjonanko.tech/user/login-merchant"
payload = {
"numero": "0700000000",
"password": "••••••••"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apidjonanko.tech/user/login-merchant",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'numero' => '0700000000',
'password' => '••••••••'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"access_token": "<jwt>",
"refresh_token": "<string>",
"user": {
"id": "<string>",
"numero": "<string>",
"fullname": "<string>",
"email": "<string>",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userType": "MERCHANT"
}
}{
"statusCode": 404,
"message": "Connexion impossible, vérifiez vos accès ou contactez l'administrateur",
"error": "Not Found"
}Body
application/json
