Add User
Use this API to add a new user to your Complyance account. This new user can be used to onboard another EGS with the ZATCA test environment
You have to pass all the required params in the specified format at the minimum to create your account successfully.
- Shell
- Javascript
- Ruby
- Python
- PHP
- Java
- Go
# You can also use wget
curl -X POST https://t5wtfl1d2e.execute-api.ap-south-1.amazonaws.com/test/api/v1/proto/addUser \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
const inputBody = '{
"email": "admin125@example.com",
"password": "Example@123"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://t5wtfl1d2e.execute-api.ap-south-1.amazonaws.com/test/api/v1/proto/addUser',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://t5wtfl1d2e.execute-api.ap-south-1.amazonaws.com/test/api/v1/proto/addUser',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://t5wtfl1d2e.execute-api.ap-south-1.amazonaws.com/test/api/v1/proto/addUser', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://t5wtfl1d2e.execute-api.ap-south-1.amazonaws.com/test/api/v1/proto/addUser', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("https://t5wtfl1d2e.execute-api.ap-south-1.amazonaws.com/test/api/v1/proto/addUser");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://t5wtfl1d2e.execute-api.ap-south-1.amazonaws.com/test/api/v1/proto/addUser", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Request Parameters
PARAMS | REQUIRED | DATA TYPE | DESCRIPTION | EXAMPLE |
---|---|---|---|---|
email | YES | string | The email for the account you want to create | example123@example.com |
password | YES | string | Password for your Antna test account. The password should contain atleast one Caps letter, Special character & number. | Example@123 |
Response Parameters
PARAMS | DATA TYPE | DESCRIPTION | EXAMPLE |
---|---|---|---|
refreshToken | string | The refresh token is a permanent token. It is valid for one year. | SUCCESS |
Body parameter
{
"email": "admin125@example.com",
"password": "Example@123"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | false | none |
Example responses
200 Response
{
"refreshToken": "eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.LodXXVxlXPN5d-3PjlcuR7VPIAOYYM2k16gGVVEXtDBLjrebuYhkI_Bnxs750CzJqLfuktNsKGVABTBd_kx4Vy3PlyyPeO326cIIGUHDukwL87DJ86G-XFWrkesY_WKKrov50NPc3h3rQ-7NZqxPoORFKP36x4XrCIG_wmZjIrSHVeQIPZ8leisZNi29SohxDDVP-O18l072iClbhknyL6vHaTDuPOntoIp2l614DoFpyZcw_pzrbZmQEFxWsM33kA67il92dajlnkt122MDgL3IiosSrpndyd7kvEJiaqI5vbBC7IpLR-Q_rS7l4l1lL6EGnHsW2F4e4lKfQWlrzA.wd-JFKEujcypjAUT.YKtcjE3xAJLck1-L4GhkmPW4GwddKc6Llm8cwEIdNbuBMG8NZFcVUYyhtNF4_r49v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Oeyh6pvKZxBxnTasoj2asTnyp1omMQXlQzH4mEiIXFdDb7L-4MllWSsqpWt4oZBhNNH7dapGPuhNRorFy7b3Kf_XMjGIqX2UK2Prq-pO_oc10gWQ_3OFD0BpGL0YdM-oARPFr8p6EgYBL9JTPBABYef9g0eGo5H3NPPX91F63aMHzfJdBnBg7BC_DSuaw.eZ4gG_CFeTrH_2wqISrPxw",
"isAdded": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Date | string | none | |
200 | Content-Type | string | none | |
200 | Content-Length | integer | none | |
200 | Connection | string | none | |
200 | x-amzn-RequestId | string | none | |
200 | Access-Control-Allow-Origin | string | none | |
200 | Access-Control-Allow-Headers | string | none | |
200 | x-amz-apigw-id | string | none | |
200 | Access-Control-Allow-Methods | string | none | |
200 | Access-Control-Expose-Headers | string | none | |
200 | X-Amzn-Trace-Id | string | none |