The Access Token resource is used to obtain an access token to be used for the FamilySearch API.
An access token can be obtained by using one of the following authentication "grant types":
- Authorization Code. This grant type is used by online web clients where a user is directed to FamilySearch.org to provide login name and password credentials. An authorization code is provided which is used to obtain an access token. For more information, see the Authorization resource and RFC 6749, Section 4.1.
- Password. This grant type is used by clients that cannot reasonably redirect a user to FamilySearch.org in a browser to provide credentials. This grant type requires the client to obtain and provide a user's username and password as specified by RFC 6749, Section 4.3. This grant type is restricted to approved developer keys. To obtain approval, contact developer support.
- Unauthenticated Session. This grant type allows the client to obtain an access token without requiring a user's credentials. Not all endpoints allow access via an unauthenticated session.
An access token is obtained by issuing a POST request to the Access Token resource with the parameters appropriate to the grant type being used. The result of a successful request will be a JSON object containing (among other things) the access token as described by RFC 6749, Section 4.
An access token expires 24 hours after it is issued of after it is unused for 60 continuous minutes.
Failure to obtain an access token will result in a response as described in RFC 6749, Section 5.2.
The Access Token resource is also used to DELETE an access token, which is done by issuing a DELETE request with the access token passed as a query parameter.
If you make a
GET request, specify the desired data format using the
POST something, specify the data format using the
|client_id||form||The application key (i.e., "client id").|
|code||form||The authorization code. Not required for the username/password or unauthenticated session grant type.)|
|grant_type||form||The grant type, which MUST be either "authorization_code", "password", or "unauthenticated_session".|
|ip_address||form||The client ip address. (Not required for the username/password or authorization code grant type.)|
|password||form||The password. (Not required for the authorization code or unauthenticated session grant type.)|
|redirect_uri||form||The redirect URI. (Not required.)|
|username||form||The username. (Not required for the authorization code or unauthenticated session grant type.)|
POST - Request an OAuth 2.0 access token.
|Obtain Access Token (Bad Parameters)||Example of invalid parameters when exchanging the authorization code for an access token.|
|Obtain Access Token with Authorization Code||How to exchange an authorization code for an access token.|
|Obtain Access Token with Username and Password||How to exchange a user's username and password for an access token.|
|Obtain Access Token without Authenticating||How to obtain an access token without authenticating.|