generatePreSignedToken
Generate a pre-signed token with a set expiry time.
Arguments
The number of days that the token will be available for authentication (From now on).
Define (and limit) the scope of the token.
Returns
GeneratePreSignedTokenMutation to generate a pre-signed token.
The pre-signed, expiring and opaque tokens will be swapped for a limited scope JWT (Kraken Token).
Possible Errors
Allowed Viewers
Required Permissions
Can generate pre signed tokensQuery Complexity
1Examples
The example data in the variables and responses below are autogenerated values designed to resemble real inputs. They do not represent actual customer data, and in some cases may require additional validation.
mutation GeneratePreSignedToken(
$email: String!,
$numberOfDaysAllowed: Int!,
$scope: PreSignedTokenScope!
) {
generatePreSignedToken(
email: $email,
numberOfDaysAllowed: $numberOfDaysAllowed,
scope: $scope
) {
scope
token
tokenExpiryDatetime
}
}
Variables
{
"email": "rock-current-type-over-might",
"numberOfDaysAllowed": 96,
"scope": "SUBMIT_METER_READINGS"
}
Response
{
"data": {
"generatePreSignedToken": {
"scope": "SUBMIT_METER_READINGS",
"token": "Republican-would-reflect-last-protect",
"tokenExpiryDatetime": "1981-03-02T17:59:15.365968+00:00"
}
}
}