Create multiple shares
curl --request POST \
--url https://api.gologin.com/share/multi \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "profile",
"instanceIds": [
"60a763f86501b32b88a109ca",
"60a763f86501b32b88a109cb"
],
"recepients": [
"recipient1@example.com",
"recipient2@example.com"
],
"role": "admin"
}
'import requests
url = "https://api.gologin.com/share/multi"
payload = {
"type": "profile",
"instanceIds": ["60a763f86501b32b88a109ca", "60a763f86501b32b88a109cb"],
"recepients": ["recipient1@example.com", "recipient2@example.com"],
"role": "admin"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'profile',
instanceIds: ['60a763f86501b32b88a109ca', '60a763f86501b32b88a109cb'],
recepients: ['recipient1@example.com', 'recipient2@example.com'],
role: 'admin'
})
};
fetch('https://api.gologin.com/share/multi', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gologin.com/share/multi",
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([
'type' => 'profile',
'instanceIds' => [
'60a763f86501b32b88a109ca',
'60a763f86501b32b88a109cb'
],
'recepients' => [
'recipient1@example.com',
'recipient2@example.com'
],
'role' => 'admin'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gologin.com/share/multi"
payload := strings.NewReader("{\n \"type\": \"profile\",\n \"instanceIds\": [\n \"60a763f86501b32b88a109ca\",\n \"60a763f86501b32b88a109cb\"\n ],\n \"recepients\": [\n \"recipient1@example.com\",\n \"recipient2@example.com\"\n ],\n \"role\": \"admin\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gologin.com/share/multi")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"profile\",\n \"instanceIds\": [\n \"60a763f86501b32b88a109ca\",\n \"60a763f86501b32b88a109cb\"\n ],\n \"recepients\": [\n \"recipient1@example.com\",\n \"recipient2@example.com\"\n ],\n \"role\": \"admin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gologin.com/share/multi")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"profile\",\n \"instanceIds\": [\n \"60a763f86501b32b88a109ca\",\n \"60a763f86501b32b88a109cb\"\n ],\n \"recepients\": [\n \"recipient1@example.com\",\n \"recipient2@example.com\"\n ],\n \"role\": \"admin\"\n}"
response = http.request(request)
puts response.read_bodyShare
Create multiple shares
Shares multiple profiles with a user.
POST
/
share
/
multi
Create multiple shares
curl --request POST \
--url https://api.gologin.com/share/multi \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "profile",
"instanceIds": [
"60a763f86501b32b88a109ca",
"60a763f86501b32b88a109cb"
],
"recepients": [
"recipient1@example.com",
"recipient2@example.com"
],
"role": "admin"
}
'import requests
url = "https://api.gologin.com/share/multi"
payload = {
"type": "profile",
"instanceIds": ["60a763f86501b32b88a109ca", "60a763f86501b32b88a109cb"],
"recepients": ["recipient1@example.com", "recipient2@example.com"],
"role": "admin"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'profile',
instanceIds: ['60a763f86501b32b88a109ca', '60a763f86501b32b88a109cb'],
recepients: ['recipient1@example.com', 'recipient2@example.com'],
role: 'admin'
})
};
fetch('https://api.gologin.com/share/multi', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gologin.com/share/multi",
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([
'type' => 'profile',
'instanceIds' => [
'60a763f86501b32b88a109ca',
'60a763f86501b32b88a109cb'
],
'recepients' => [
'recipient1@example.com',
'recipient2@example.com'
],
'role' => 'admin'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gologin.com/share/multi"
payload := strings.NewReader("{\n \"type\": \"profile\",\n \"instanceIds\": [\n \"60a763f86501b32b88a109ca\",\n \"60a763f86501b32b88a109cb\"\n ],\n \"recepients\": [\n \"recipient1@example.com\",\n \"recipient2@example.com\"\n ],\n \"role\": \"admin\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gologin.com/share/multi")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"profile\",\n \"instanceIds\": [\n \"60a763f86501b32b88a109ca\",\n \"60a763f86501b32b88a109cb\"\n ],\n \"recepients\": [\n \"recipient1@example.com\",\n \"recipient2@example.com\"\n ],\n \"role\": \"admin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gologin.com/share/multi")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"profile\",\n \"instanceIds\": [\n \"60a763f86501b32b88a109ca\",\n \"60a763f86501b32b88a109cb\"\n ],\n \"recepients\": [\n \"recipient1@example.com\",\n \"recipient2@example.com\"\n ],\n \"role\": \"admin\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Type of the instance you want to share. You can share particular profiles or group of profiles as a folder.
Available options:
profile, folder Example:
"profile"
IDs of the instances that should be shared.
Example:
[
"60a763f86501b32b88a109ca",
"60a763f86501b32b88a109cb"
]Array of emails of the recipients.
Example:
[
"recipient1@example.com",
"recipient2@example.com"
]Role of the recipient
Available options:
administrator, redactor, guest Example:
"admin"
Response
201 - undefined
Was this page helpful?
⌘I