A comprehensive API endpoint documentation for retrieving organization members through various programming languages including authentication headers optional query parameters and response structure with sample code snippets.
Get member
GET /organizations/{org_id}/users/{user_id}
This endpoint retrieves the profile information for a specific member (user) within the organization, identified by their unique user ID.
Replace {org_id}
with your Organization ID and {user_id}
with the numeric ID of the member you want to retrieve.
Authorization: Bearer {your_access_token}
Accept: application/json
X-Tallyfy-Client: APIClient
with
(string): Include additional related data. Common options might bestats
,assets
,groups
(check Swagger for specifics).
const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';const orgId = 'YOUR_ORGANIZATION_ID';const userId = 12345; // ID of the member to retrieve
const queryParams = '?with=groups'; // Example: get groups the member belongs toconst apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/users/${userId}${queryParams}`;
const headers = new Headers();headers.append('Authorization', `Bearer ${accessToken}`);headers.append('Accept', 'application/json');headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, { method: 'GET', headers: headers}).then(response => { return response.json().then(data => { // Attempt to parse JSON regardless of status if (!response.ok) { console.error(`Failed to get member ${userId}:`, data); throw new Error(`HTTP error! status: ${response.status}`); } return data; // Pass successful data along });}).then(data => { console.log(`Successfully retrieved member ${userId}:`); console.log(JSON.stringify(data, null, 2));}).catch(error => { console.error(`Error getting member ${userId}:`, error.message);});
import requestsimport jsonimport os
access_token = os.environ.get('TALLYFY_ACCESS_TOKEN', 'YOUR_PERSONAL_ACCESS_TOKEN')org_id = os.environ.get('TALLYFY_ORG_ID', 'YOUR_ORGANIZATION_ID')user_id = 12345 # ID of the member to retrieveapi_url = f'https://go.tallyfy.com/api/organizations/{org_id}/users/{user_id}'
headers = { 'Authorization': f'Bearer {access_token}', 'Accept': 'application/json', 'X-Tallyfy-Client': 'APIClient'}
# Optional: Add query parametersparams = { 'with': 'groups' # Example: include groups the member belongs to}
response = Nonetry: response = requests.get(api_url, headers=headers, params=params) response.raise_for_status() # Raises HTTPError for bad responses (4xx or 5xx)
member_data = response.json() print(f'Successfully retrieved member {user_id}:') print(json.dumps(member_data, indent=4))
except requests.exceptions.HTTPError as http_err: print(f"HTTP error occurred getting member {user_id}: {http_err}") if response is not None: print(f"Response Body: {response.text}")except requests.exceptions.RequestException as req_err: print(f"Request failed getting member {user_id}: {req_err}")except json.JSONDecodeError: print(f"Failed to decode JSON response for member {user_id}") if response is not None: print(f"Response Text: {response.text}")except Exception as err: print(f"An unexpected error occurred: {err}")
import java.net.URI;import java.net.URLEncoder;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.io.IOException;import java.nio.charset.StandardCharsets;import java.util.Map;import java.util.stream.Collectors;
public class GetMember { public static void main(String[] args) { String accessToken = System.getenv().getOrDefault("TALLYFY_ACCESS_TOKEN", "YOUR_PERSONAL_ACCESS_TOKEN"); String orgId = System.getenv().getOrDefault("TALLYFY_ORG_ID", "YOUR_ORGANIZATION_ID"); int userId = 12345; // ID of the member String baseUrl = "https://go.tallyfy.com/api/organizations/" + orgId + "/users/" + userId;
// Optional: Add query parameters Map<String, String> queryParamsMap = Map.of("with", "groups"); String queryParamsString = queryParamsMap.entrySet().stream() .map(entry -> URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8) + "=" + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8)) .collect(Collectors.joining("&", "?", ""));
String apiUrl = baseUrl + (queryParamsMap.isEmpty() ? "" : queryParamsString);
HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(apiUrl)) .header("Authorization", "Bearer " + accessToken) .header("Accept", "application/json") .header("X-Tallyfy-Client", "APIClient") .GET() .build();
try { HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() == 200) { System.out.println("Successfully retrieved member " + userId + ":"); System.out.println(response.body()); // TODO: Consider parsing JSON using Jackson/Gson } else { System.err.println("Failed to get member " + userId + ". Status: " + response.statusCode()); System.err.println("Response Body: " + response.body()); } } catch (IOException | InterruptedException e) { System.err.println("Request failed: " + e.getMessage()); Thread.currentThread().interrupt(); } catch (Exception e) { System.err.println("An unexpected error occurred: " + e.getMessage()); e.printStackTrace(); } }}
package main
import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "os" "strconv" "time")
func main() { accessToken := os.Getenv("TALLYFY_ACCESS_TOKEN") if accessToken == "" { accessToken = "YOUR_PERSONAL_ACCESS_TOKEN" } orgId := os.Getenv("TALLYFY_ORG_ID") if orgId == "" { orgId = "YOUR_ORGANIZATION_ID" } userId := 12345 // ID of the member baseUrl := fmt.Sprintf("https://go.tallyfy.com/api/organizations/%s/users/%s", orgId, strconv.Itoa(userId))
// Optional: Add query parameters queryParams := url.Values{} queryParams.Add("with", "groups")
apiUrl := baseUrl if len(queryParams) > 0 { apiUrl += "?" + queryParams.Encode() }
client := &http.Client{Timeout: 10 * time.Second} req, err := http.NewRequest("GET", apiUrl, nil) if err != nil { fmt.Printf("Error creating get member request for ID %d: %v\n", userId, err) return }
req.Header.Set("Authorization", "Bearer "+accessToken) req.Header.Set("Accept", "application/json") req.Header.Set("X-Tallyfy-Client", "APIClient")
resp, err := client.Do(req) if err != nil { fmt.Printf("Error executing get member request for ID %d: %v\n", userId, err) return } defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Printf("Error reading get member response body for ID %d: %v\n", userId, err) return }
if resp.StatusCode != http.StatusOK { fmt.Printf("Failed to get member %d. Status: %d\nBody: %s\n", userId, resp.StatusCode, string(body)) return }
fmt.Printf("Successfully retrieved member %d:\n", userId) // Pretty print JSON response var prettyJSON bytes.Buffer if err := json.Indent(&prettyJSON, body, "", " "); err == nil { fmt.Println(prettyJSON.String()) } else { fmt.Println(string(body)) } // TODO: Unmarshal JSON into a struct if needed}
#include <iostream>#include <string>#include <cpprest/http_client.h>#include <cpprest/json.h>
using namespace web;using namespace web::http;using namespace web::http::client;using namespace web::json;
pplx::task<void> GetTallyfyMember(int userId){ utility::string_t accessToken = U("YOUR_PERSONAL_ACCESS_TOKEN"); utility::string_t orgId = U("YOUR_ORGANIZATION_ID"); utility::string_t userIdStr = utility::conversions::to_string_t(std::to_string(userId));
uri_builder builder(U("https://go.tallyfy.com/api/organizations/")); builder.append_path(orgId); builder.append_path(U("users")); builder.append_path(userIdStr); builder.append_query(U("with"), U("groups")); // Example query parameter utility::string_t apiUrl = builder.to_string();
http_client client(apiUrl); http_request request(methods::GET);
request.headers().add(U("Authorization"), U("Bearer ") + accessToken); request.headers().add(U("Accept"), U("application/json")); request.headers().add(U("X-Tallyfy-Client"), U("APIClient"));
return client.request(request).then([userId](http_response response) { return response.extract_json().then([response, userId](pplx::task<value> task) { try { value const & body = task.get(); if (response.status_code() == status_codes::OK) { std::wcout << L"Successfully retrieved member " << userId << L":\n" << body.serialize() << std::endl; // Access data: body[U("data")][U("email")].as_string(); } else { std::wcerr << L"Failed to get member " << userId << L". Status: " << response.status_code() << L"\nResponse: " << body.serialize() << std::endl; } } catch (const http_exception& e) { std::wcerr << L"HTTP exception during get member: " << e.what() << std::endl; } catch (const std::exception& e) { std::wcerr << L"Exception during get member response handling: " << e.what() << std::endl; } }); });}
int main() { try { GetTallyfyMember(12345).wait(); // Replace with actual member ID } catch (const std::exception &e) { std::cerr << "Error in main: " << e.what() << std::endl; } return 0;}// Requires C++ REST SDK (Casablanca)
using System;using System.Net.Http;using System.Net.Http.Headers;using System.Threading.Tasks;using System.Text.Json;using System.Web; // For HttpUtility
public class TallyfyMemberGetter{ private static readonly HttpClient client = new HttpClient();
public static async Task GetMemberAsync(int userId) { var accessToken = Environment.GetEnvironmentVariable("TALLYFY_ACCESS_TOKEN") ?? "YOUR_PERSONAL_ACCESS_TOKEN"; var orgId = Environment.GetEnvironmentVariable("TALLYFY_ORG_ID") ?? "YOUR_ORGANIZATION_ID";
// Build URL with query parameters var query = HttpUtility.ParseQueryString(string.Empty); query["with"] = "groups"; // Example string queryString = query.ToString(); var apiUrl = $"https://go.tallyfy.com/api/organizations/{orgId}/users/{userId}?{queryString}";
try { using var request = new HttpRequestMessage(HttpMethod.Get, apiUrl); request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); request.Headers.Add("X-Tallyfy-Client", "APIClient");
HttpResponseMessage response = await client.SendAsync(request); string responseBody = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode) { Console.WriteLine($"Successfully retrieved member {userId}:"); // Pretty print JSON try { using var doc = JsonDocument.Parse(responseBody); Console.WriteLine(JsonSerializer.Serialize(doc.RootElement, new JsonSerializerOptions { WriteIndented = true })); // Access data: doc.RootElement.GetProperty("data").GetProperty("email").GetString(); } catch (JsonException) { Console.WriteLine(responseBody); // Print raw if not valid JSON } } else { Console.WriteLine($"Failed to get member {userId}. Status: {response.StatusCode}"); Console.WriteLine($"Response: {responseBody}"); } } catch (HttpRequestException e) { Console.WriteLine($"Request Exception getting member {userId}: {e.Message}"); } catch (Exception ex) { Console.WriteLine($"An unexpected error occurred: {ex.Message}"); } }
// Example Usage: // static async Task Main(string[] args) // { // await GetMemberAsync(12345); // }}
A successful request returns a 200 OK
status code and a JSON object containing a data
field. The value of data
is an object representing the requested member’s profile.
{ "data": { "id": 12345, "email": "specific.user@example.com", "username": "specificuser", "first_name": "Specific", "last_name": "User", "full_name": "Specific User", "profile_pic": "https://.../avatar.png", "active": true, "status": "active", "user_role": "Standard", "timezone": "America/Los_Angeles", "created_at": "2023-02-01T12:00:00Z", // ... other standard user properties ... // Included if requested with 'with=stats': "stats": { "active_tasks": 15, "completed_tasks": 120, // ... other stats ... }, // Included if requested with 'with=groups': "groups": [ { "id": "group_id_3", "name": "Project Alpha" } ] }}
If the user ID is not found or you lack permission, you will receive a 404 Not Found
or 403 Forbidden
error.
The GET endpoint allows retrieving detailed information about a specific group within an organization using its unique ID through authenticated API requests with code examples in multiple programming languages.
The GET endpoint enables retrieval of specific tag details through unique IDs with optional related data inclusion and returns a JSON response containing tag information along with error handling for invalid requests or permissions.
The GET endpoint allows retrieving organization-specific groups with their details such as IDs names descriptions logos member lists and timestamps through authenticated API requests using various programming languages.
About Tallyfy
- 2025 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks