Skip to content

Authentication

griddy / nfl / endpoints / regular / authentication**

authentication

Classes

Authentication

Authentication(
    sdk_config: SDKConfiguration,
    parent_ref: Optional[object] = None,
)

Bases: BaseSDK


              flowchart TD
              griddy.nfl.endpoints.regular.authentication.Authentication[Authentication]
              griddy.nfl.basesdk.BaseSDK[BaseSDK]

                              griddy.nfl.basesdk.BaseSDK --> griddy.nfl.endpoints.regular.authentication.Authentication
                


              click griddy.nfl.endpoints.regular.authentication.Authentication href "" "griddy.nfl.endpoints.regular.authentication.Authentication"
              click griddy.nfl.basesdk.BaseSDK href "" "griddy.nfl.basesdk.BaseSDK"
            

Token generation and refresh operations for NFL API access

Source code in griddy/nfl/basesdk.py
def __init__(
    self,
    sdk_config: SDKConfiguration,
    parent_ref: Optional[object] = None,
) -> None:
    self.sdk_configuration = sdk_config
    self.parent_ref = parent_ref
Functions
generate_token
generate_token(
    *,
    client_key: str,
    client_secret: str,
    device_id: str,
    device_info: str,
    network_type: TokenRequestNetworkType,
    retries: OptionalNullable[RetryConfig] = UNSET,
    server_url: Optional[str] = None,
    timeout_ms: Optional[int] = None,
    http_headers: Optional[Mapping[str, str]] = None
) -> TokenResponse

Generate Initial Access Token

Creates a new access token and refresh token for a client device. This is the initial authentication endpoint that establishes a session for accessing NFL APIs. Requires client credentials and device information.

:param client_key: Client application identifier key :param client_secret: Client application secret for authentication :param device_id: Unique device identifier (UUID format) :param device_info: Base64-encoded JSON containing device information such as: {\"model\":\"desktop\",\"version\":\"Chrome\",\"osName\":\"Windows\",\"osVersion\":\"10\"} :param network_type: Type of network connection :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.

Source code in griddy/nfl/endpoints/regular/authentication.py
def generate_token(
    self,
    *,
    client_key: str,
    client_secret: str,
    device_id: str,
    device_info: str,
    network_type: models.TokenRequestNetworkType,
    retries: OptionalNullable[utils.RetryConfig] = UNSET,
    server_url: Optional[str] = None,
    timeout_ms: Optional[int] = None,
    http_headers: Optional[Mapping[str, str]] = None,
) -> models.TokenResponse:
    r"""Generate Initial Access Token

    Creates a new access token and refresh token for a client device. This is the initial authentication
    endpoint that establishes a session for accessing NFL APIs. Requires client credentials and device information.


    :param client_key: Client application identifier key
    :param client_secret: Client application secret for authentication
    :param device_id: Unique device identifier (UUID format)
    :param device_info: Base64-encoded JSON containing device information such as: {\"model\":\"desktop\",\"version\":\"Chrome\",\"osName\":\"Windows\",\"osVersion\":\"10\"}
    :param network_type: Type of network connection
    :param retries: Override the default retry configuration for this method
    :param server_url: Override the default server URL for this method
    :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
    :param http_headers: Additional headers to set or replace on requests.
    """
    config = self._generate_token_config(
        client_key=client_key,
        client_secret=client_secret,
        device_id=device_id,
        device_info=device_info,
        network_type=network_type,
        retries=retries,
        server_url=server_url,
        timeout_ms=timeout_ms,
        http_headers=http_headers,
    )
    return self._execute_endpoint(config)
generate_token_async async
generate_token_async(
    *,
    client_key: str,
    client_secret: str,
    device_id: str,
    device_info: str,
    network_type: TokenRequestNetworkType,
    retries: OptionalNullable[RetryConfig] = UNSET,
    server_url: Optional[str] = None,
    timeout_ms: Optional[int] = None,
    http_headers: Optional[Mapping[str, str]] = None
) -> TokenResponse

Generate Initial Access Token

Creates a new access token and refresh token for a client device. This is the initial authentication endpoint that establishes a session for accessing NFL APIs. Requires client credentials and device information.

:param client_key: Client application identifier key :param client_secret: Client application secret for authentication :param device_id: Unique device identifier (UUID format) :param device_info: Base64-encoded JSON containing device information such as: {\"model\":\"desktop\",\"version\":\"Chrome\",\"osName\":\"Windows\",\"osVersion\":\"10\"} :param network_type: Type of network connection :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.

Source code in griddy/nfl/endpoints/regular/authentication.py
async def generate_token_async(
    self,
    *,
    client_key: str,
    client_secret: str,
    device_id: str,
    device_info: str,
    network_type: models.TokenRequestNetworkType,
    retries: OptionalNullable[utils.RetryConfig] = UNSET,
    server_url: Optional[str] = None,
    timeout_ms: Optional[int] = None,
    http_headers: Optional[Mapping[str, str]] = None,
) -> models.TokenResponse:
    r"""Generate Initial Access Token

    Creates a new access token and refresh token for a client device. This is the initial authentication
    endpoint that establishes a session for accessing NFL APIs. Requires client credentials and device information.


    :param client_key: Client application identifier key
    :param client_secret: Client application secret for authentication
    :param device_id: Unique device identifier (UUID format)
    :param device_info: Base64-encoded JSON containing device information such as: {\"model\":\"desktop\",\"version\":\"Chrome\",\"osName\":\"Windows\",\"osVersion\":\"10\"}
    :param network_type: Type of network connection
    :param retries: Override the default retry configuration for this method
    :param server_url: Override the default server URL for this method
    :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
    :param http_headers: Additional headers to set or replace on requests.
    """
    config = self._generate_token_config(
        client_key=client_key,
        client_secret=client_secret,
        device_id=device_id,
        device_info=device_info,
        network_type=network_type,
        retries=retries,
        server_url=server_url,
        timeout_ms=timeout_ms,
        http_headers=http_headers,
    )
    return await self._execute_endpoint_async(config)
refresh_token
refresh_token(
    *,
    client_key: str,
    client_secret: str,
    device_id: str,
    device_info: str,
    network_type: RefreshTokenRequestNetworkType,
    refresh_token: str,
    signature_timestamp: str,
    uid: str,
    uid_signature: str,
    retries: OptionalNullable[RetryConfig] = UNSET,
    server_url: Optional[str] = None,
    timeout_ms: Optional[int] = None,
    http_headers: Optional[Mapping[str, str]] = None
) -> TokenResponse

Refresh Access Token

Refreshes an existing access token using a valid refresh token. This endpoint extends the user's session by generating new access and refresh tokens. Requires the previous refresh token and signature verification.

:param client_key: Client application identifier key :param client_secret: Client application secret for authentication :param device_id: Unique device identifier (UUID format) :param device_info: Base64-encoded JSON containing device information such as: {\"model\":\"desktop\",\"version\":\"Chrome\",\"osName\":\"Windows\",\"osVersion\":\"10\"} :param network_type: Type of network connection :param refresh_token: Valid refresh token from previous authentication :param signature_timestamp: Unix timestamp for signature verification :param uid: User identifier hash :param uid_signature: HMAC signature for request verification :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.

Source code in griddy/nfl/endpoints/regular/authentication.py
def refresh_token(
    self,
    *,
    client_key: str,
    client_secret: str,
    device_id: str,
    device_info: str,
    network_type: models.RefreshTokenRequestNetworkType,
    refresh_token: str,
    signature_timestamp: str,
    uid: str,
    uid_signature: str,
    retries: OptionalNullable[utils.RetryConfig] = UNSET,
    server_url: Optional[str] = None,
    timeout_ms: Optional[int] = None,
    http_headers: Optional[Mapping[str, str]] = None,
) -> models.TokenResponse:
    r"""Refresh Access Token

    Refreshes an existing access token using a valid refresh token. This endpoint extends the user's
    session by generating new access and refresh tokens. Requires the previous refresh token and
    signature verification.


    :param client_key: Client application identifier key
    :param client_secret: Client application secret for authentication
    :param device_id: Unique device identifier (UUID format)
    :param device_info: Base64-encoded JSON containing device information such as: {\"model\":\"desktop\",\"version\":\"Chrome\",\"osName\":\"Windows\",\"osVersion\":\"10\"}
    :param network_type: Type of network connection
    :param refresh_token: Valid refresh token from previous authentication
    :param signature_timestamp: Unix timestamp for signature verification
    :param uid: User identifier hash
    :param uid_signature: HMAC signature for request verification
    :param retries: Override the default retry configuration for this method
    :param server_url: Override the default server URL for this method
    :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
    :param http_headers: Additional headers to set or replace on requests.
    """
    config = self._refresh_token_config(
        client_key=client_key,
        client_secret=client_secret,
        device_id=device_id,
        device_info=device_info,
        network_type=network_type,
        refresh_token=refresh_token,
        signature_timestamp=signature_timestamp,
        uid=uid,
        uid_signature=uid_signature,
        retries=retries,
        server_url=server_url,
        timeout_ms=timeout_ms,
        http_headers=http_headers,
    )
    return self._execute_endpoint(config)
refresh_token_async async
refresh_token_async(
    *,
    client_key: str,
    client_secret: str,
    device_id: str,
    device_info: str,
    network_type: RefreshTokenRequestNetworkType,
    refresh_token: str,
    signature_timestamp: str,
    uid: str,
    uid_signature: str,
    retries: OptionalNullable[RetryConfig] = UNSET,
    server_url: Optional[str] = None,
    timeout_ms: Optional[int] = None,
    http_headers: Optional[Mapping[str, str]] = None
) -> TokenResponse

Refresh Access Token

Refreshes an existing access token using a valid refresh token. This endpoint extends the user's session by generating new access and refresh tokens. Requires the previous refresh token and signature verification.

:param client_key: Client application identifier key :param client_secret: Client application secret for authentication :param device_id: Unique device identifier (UUID format) :param device_info: Base64-encoded JSON containing device information such as: {\"model\":\"desktop\",\"version\":\"Chrome\",\"osName\":\"Windows\",\"osVersion\":\"10\"} :param network_type: Type of network connection :param refresh_token: Valid refresh token from previous authentication :param signature_timestamp: Unix timestamp for signature verification :param uid: User identifier hash :param uid_signature: HMAC signature for request verification :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds :param http_headers: Additional headers to set or replace on requests.

Source code in griddy/nfl/endpoints/regular/authentication.py
async def refresh_token_async(
    self,
    *,
    client_key: str,
    client_secret: str,
    device_id: str,
    device_info: str,
    network_type: models.RefreshTokenRequestNetworkType,
    refresh_token: str,
    signature_timestamp: str,
    uid: str,
    uid_signature: str,
    retries: OptionalNullable[utils.RetryConfig] = UNSET,
    server_url: Optional[str] = None,
    timeout_ms: Optional[int] = None,
    http_headers: Optional[Mapping[str, str]] = None,
) -> models.TokenResponse:
    r"""Refresh Access Token

    Refreshes an existing access token using a valid refresh token. This endpoint extends the user's
    session by generating new access and refresh tokens. Requires the previous refresh token and
    signature verification.


    :param client_key: Client application identifier key
    :param client_secret: Client application secret for authentication
    :param device_id: Unique device identifier (UUID format)
    :param device_info: Base64-encoded JSON containing device information such as: {\"model\":\"desktop\",\"version\":\"Chrome\",\"osName\":\"Windows\",\"osVersion\":\"10\"}
    :param network_type: Type of network connection
    :param refresh_token: Valid refresh token from previous authentication
    :param signature_timestamp: Unix timestamp for signature verification
    :param uid: User identifier hash
    :param uid_signature: HMAC signature for request verification
    :param retries: Override the default retry configuration for this method
    :param server_url: Override the default server URL for this method
    :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
    :param http_headers: Additional headers to set or replace on requests.
    """
    config = self._refresh_token_config(
        client_key=client_key,
        client_secret=client_secret,
        device_id=device_id,
        device_info=device_info,
        network_type=network_type,
        refresh_token=refresh_token,
        signature_timestamp=signature_timestamp,
        uid=uid,
        uid_signature=uid_signature,
        retries=retries,
        server_url=server_url,
        timeout_ms=timeout_ms,
        http_headers=http_headers,
    )
    return await self._execute_endpoint_async(config)