To create wallet on 1app, you need to have 1app Business account. On your dashboard go to the create app section to create app and generate App ID/Token
cURL NodeJs PHP - cURL Python
Copy curl --location --request POST 'https://api.oneappgo.com/v1/business/createwallet' \
--header 'Authorization: Bearer SECRET_KEY' \
--form 'apptoken="APPID"' \
--form 'fname="testname"' \
--form 'sname="testsurname"' \
--form 'email="email@example.com"' \
--form 'phoneno="08000000000"' \
--form 'auth="D@tqj8265!"' \
--form 'referby=""'
Copy var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.oneappgo.com/v1/business/createwallet',
'headers': {
'Authorization': 'Bearer SECRET_KEY'
},
formData: {
'apptoken': 'APPID',
'fname': 'testname',
'sname': 'testsurname',
'email': 'email@example.com',
'phoneno': '08000000000',
'auth': 'D@tqj8265',
'referby': ''
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Copy <?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.oneappgo.com/v1/business/createwallet',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('apptoken' => 'APPID','fname' => 'testname','sname' => 'testsurname','email' => 'email@example.com','phoneno' => '08000000000','auth' => 'D@tqj8265','referby' => ''),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer SECRET_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Copy import requests
url = "https://api.oneappgo.com/v1/business/createwallet"
payload={'apptoken': 'APPID',
'fname': 'testname',
'sname': 'testsurname',
'email': 'email@example.com',
'phoneno': '08000000000',
'auth': 'D@tqj8265',
'referby': ''}
files=[
]
headers = {
'Authorization': 'Bearer SECRET_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
Copy {
"status" : true ,
"email" : "email@example.com" ,
"accountid" : "3107908" ,
"businessid" : "" ,
"msg" : "Wallet successfully created!"
}