def get_installation_token(installation_id, integration_jwt):
api_root = '<STR_LIT>'<EOL>url = '<STR_LIT>'.format(<EOL>api_root=api_root,<EOL>id_=installation_id)<EOL>headers = {<EOL>'<STR_LIT>': '<STR_LIT>'.format(integration_jwt.decode('<STR_LIT:utf-8>')),<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>}<EOL>resp = requests.post(url, headers=headers)<EOL>resp.raise_for_status()<EOL>return resp.json()<EOL>
Create a GitHub token for an integration installation.

    Parameters
    ----------
    installation_id : `int`
        Installation ID. This is available in the URL of the integration's
        **installation** ID.
    integration_jwt : `bytes`
        The integration's JSON Web Token (JWT). You can create this with
        `create_jwt`.

    Returns
    -------
    token_obj : `dict`
        GitHub token object. Includes the fields:

        - ``token``: the token string itself.
        - ``expires_at``: date time string when the token expires.

    Example
    -------
    The typical workflow for authenticating to an integration installation is:

    .. code-block:: python

       from dochubadapter.github import auth
       jwt = auth.create_jwt(integration_id, private_key_path)
       token_obj = auth.get_installation_token(installation_id, jwt)
       print(token_obj['token'])

    Notes
    -----
    See
    https://developer.github.com/early-access/integrations/authentication/#as-an-installation
    for more information