app.request_maskinporten_token()
Requests an access token from Maskinporten using API-specific credentials.
Usage
app.request_maskinporten_token(api_env)Parameters
api_env: str- The environment of the API (e.g., “prod” or “test”).
Returns
tuple: tuple- A tuple containing the access token (str) and its expiration time (int).
Raises
Exception- If the token request fails.
Examples
request_maskinporten_token(api_env = “test”)