List organizations for the authenticated user
curl --request GET \
--url https://thirdparty.qonto.com/v2/user_organizations \
--header 'Authorization: Bearer <token>'import requests
url = "https://thirdparty.qonto.com/v2/user_organizations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://thirdparty.qonto.com/v2/user_organizations', 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://thirdparty.qonto.com/v2/user_organizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://thirdparty.qonto.com/v2/user_organizations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://thirdparty.qonto.com/v2/user_organizations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/user_organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"organizations": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Acme Corp",
"legal_name": "Acme Corporation SAS",
"legal_number": "12345678900010",
"legal_country": "FR",
"membership_role": "owner"
},
{
"id": "987fcdeb-51a2-43f7-9012-345678901234",
"name": "Omega Ltd",
"legal_name": "Omega Limited GmbH",
"legal_number": "HRB 12345",
"legal_country": "DE",
"membership_role": "admin"
}
]
}Organizations
Get user organizations
OAuth scope: user_organization.read
Returns the list of organizations the authenticated user belongs to.
GET
/
v2
/
user_organizations
List organizations for the authenticated user
curl --request GET \
--url https://thirdparty.qonto.com/v2/user_organizations \
--header 'Authorization: Bearer <token>'import requests
url = "https://thirdparty.qonto.com/v2/user_organizations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://thirdparty.qonto.com/v2/user_organizations', 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://thirdparty.qonto.com/v2/user_organizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://thirdparty.qonto.com/v2/user_organizations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://thirdparty.qonto.com/v2/user_organizations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/user_organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"organizations": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Acme Corp",
"legal_name": "Acme Corporation SAS",
"legal_number": "12345678900010",
"legal_country": "FR",
"membership_role": "owner"
},
{
"id": "987fcdeb-51a2-43f7-9012-345678901234",
"name": "Omega Ltd",
"legal_name": "Omega Limited GmbH",
"legal_number": "HRB 12345",
"legal_country": "DE",
"membership_role": "admin"
}
]
}This endpoint returns a list of organizations that the user consented to give access to.
This endpoint is only available for
user oauth flow. It gives you the list of organizations that the user has consented to give access to, and the organization_id for each organization. You can use the organization_id to make API calls on behalf of that organization.Authorizations
OAuthSecretKey
Bearer authorization header: Bearer <token>, where <token> is the access token received from the authorization server at the end of the OAuth 2.0 flow.
Headers
Required only for Sandbox API requests; to get one, please sign up to the Developer Portal.
Response
Returns the list of organizations the authenticated user belongs to.
Show child attributes
Show child attributes
Was this page helpful?