Skip to content

Retrieve a member

client.Member.Get(ctx, id) (*MemberRetrieveResponse, error)
GET/v1/members/{id}

Retrieves a single member by their ID.

Required scope: members:read

Rate limit category: Read

ParametersExpand Collapse
id string

Unique identifier of the member to retrieve.

ReturnsExpand Collapse
type MemberRetrieveResponse struct{…}
ID string

Unique identifier for the member.

CreatedAt string

ISO 8601 timestamp of when the member was created.

Fields MemberRetrieveResponseFields

Map of field names to their typed values.

Email MemberRetrieveResponseFieldsEmail

The member’s email address.

Value string

The field value.

ValueType string

The data type of the field value.

Name MemberRetrieveResponseFieldsName

The member’s full name.

Value MemberRetrieveResponseFieldsNameValue
FirstName stringOptional

The contact’s first name.

LastName stringOptional

The contact’s last name.

ValueType string

The data type of the field value.

ProfileImage MemberRetrieveResponseFieldsProfileImage

URL of the member’s profile image, or null if unset.

Value string

The field value, or null if unset.

ValueType string

The data type of the field value.

Role MemberRetrieveResponseFieldsRole

The member’s workspace role.

Value string

The field value.

ValueType string

The data type of the field value.

Relationships any

Members do not expose writable or readable relationships in this API.

UpdatedAt string

ISO 8601 timestamp of when the member was last updated, or null.

Retrieve a member

package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  memberRetrieveResponse, err := client.Member.Get(context.TODO(), "id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", memberRetrieveResponse.ID)
}
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "$email": {
      "value": "value",
      "valueType": "EMAIL"
    },
    "$name": {
      "value": {
        "firstName": "firstName",
        "lastName": "lastName"
      },
      "valueType": "FULL_NAME"
    },
    "$profileImage": {
      "value": "value",
      "valueType": "URL"
    },
    "$role": {
      "value": "value",
      "valueType": "TEXT"
    }
  },
  "httpLink": "httpLink",
  "relationships": {},
  "updatedAt": "updatedAt"
}
Returns Examples
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "$email": {
      "value": "value",
      "valueType": "EMAIL"
    },
    "$name": {
      "value": {
        "firstName": "firstName",
        "lastName": "lastName"
      },
      "valueType": "FULL_NAME"
    },
    "$profileImage": {
      "value": "value",
      "valueType": "URL"
    },
    "$role": {
      "value": "value",
      "valueType": "TEXT"
    }
  },
  "httpLink": "httpLink",
  "relationships": {},
  "updatedAt": "updatedAt"
}