Family Tree Sample App

Code samples and functional demonstrations of how to use common features of the FamilySearch API.

Authenticate

Access to the APIs requires authentication by passing an access token with each API request. Authenticate with OAuth 2 to obtain an access token.

You have successfully authenticated as .

Your access token is:

Search

This sample demonstrates how to search. Try entering "Smith" as the last name.


            

Match

This sample demonstrates how to match a person using a person ID.

Try KWQ7-Y57 or KW3B-NR5 or search for your own person ID above.


            

            

Person Read

This sample demonstrates how to read a person.

Try KWQ7-Y57 or KW3B-NR5 or search for your own person ID above.


            

            

Person Create and Delete with Notes

This sample demonstrates how to create and delete a person.

  • Create a person
  • Create a person note
  • Read and display person note
  • Delete the person
  • Undelete the person
  • Delete the person again

            

            

Person Discussion References

This sample demonstrates how to perform person discussion reference operations.

  • Create a person
  • Create a discussion
  • Read and display the discussion
  • Delete the discussion
  • Delete the person

            

            

Parent Child Relationship

This sample demonstrates how to perform operations on a parent child relationship.

  • Create the parent
  • Create the child
  • Create the relationship
  • Read and display the relationship
  • Delete the relationship
  • Undelete the relationship
  • Delete the relationship again
  • Delete the parent
  • Delete the child

            

            

Couple Relationship with Conclusion

This sample demonstrates how to perform couple relationship operations.

  • Create husband person
  • Create wife person
  • Create relationship
  • Create marriage conclusion
  • Read and display relationship
  • Delete the relationship
  • Delete the husband person
  • Delete the wife person

            

            

Person Merge

This sample demonstrates how to merge two persons.

  • Create person 1
  • Create person 2
  • Merge analysis
  • Merge persons 1 and 2
  • Display merge results
  • Delete the merged person

            

            

Sources

This sample demonstrates how to perform the following source reference operations:

  • Create a person
  • Create a source reference
  • Read and display the source reference
  • Delete the source reference
  • Delete the person

            

            

Person Conclusions

This sample demonstrates how to perform conclusion operations.

  • Create a person
  • Create a conclusion
  • Get the conclusion ID
  • Update the conclusion
  • Display the updated person
  • Delete the conclusion
  • Delete the person

            

            

Current User

This sample demonstrates how to get the current user's profile.


            

            

Common Sample Code