Greetings Jörg,
Youâll have to build out the refresh process. Based on the connection information that youâve added, there isnât anything doing that currently. If you can post the REST API docs I might be able to help point you in the right direction. A lot of âJWTâ connections really need to use some of the connection details from the OAuth2 connection example: OAuth2 - Make Apps
Hereâs the connection from the QuickBooks app to give you an idea. Note the refresh portion. :
{
"authorize": {
"qs": {
"scope": "{{join(oauth.scope, ',')}}",
"client_id": "{{ifempty(parameters.clientId, common.clientId)}}",
"redirect_uri": "{{oauth.redirectUri}}",
"response_type": "code"
},
"url": "https://appcenter.intuit.com/connect/oauth2",
"response": {
"temp": {
"code": "{{query.code}}"
},
"data": {
"realmId": "{{query.realmId}}"
}
}
},
"token": {
"url": "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer",
"method": "POST",
"body": {
"code": "{{temp.code}}",
"client_id": "{{ifempty(data.clientId, common.clientId)}}",
"grant_type": "authorization_code",
"redirect_uri": "{{oauth.redirectUri}}",
"client_secret": "{{ifempty(data.clientSecret, common.clientSecret)}}"
},
"type": "urlencoded",
"response": {
"data": {
"expires": "{{addSeconds(now, body.expires_in)}}",
"accessToken": "{{body.access_token}}",
"refreshToken": "{{body.refresh_token}}"
},
"expires": "{{addSeconds(now, body.x_refresh_token_expires_in)}}"
},
"log": {
"sanitize": [
"request.body.code",
"request.body.client_secret",
"response.body.access_token",
"response.body.refresh_token"
]
}
},
"refresh": {
"condition": "{{data.expires < addMinutes(now, 1)}}",
"url": "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer",
"method": "POST",
"body": {
"client_id": "{{ifempty(parameters.clientId, common.clientId)}}",
"grant_type": "refresh_token",
"client_secret": "{{ifempty(parameters.clientSecret, common.clientSecret)}}",
"refresh_token": "{{data.refreshToken}}"
},
"type": "urlencoded",
"response": {
"data": {
"expires": "{{addSeconds(now, body.expires_in)}}",
"accessToken": "{{body.access_token}}",
"refreshToken": "{{body.refresh_token}}"
},
"expires": "{{addSeconds(now, body.x_refresh_token_expires_in)}}"
},
"log": {
"sanitize": [
"request.body.client_secret",
"request.body.refresh_token",
"response.body.access_token",
"response.body.refresh_token"
]
}
},
"info": {
"url": "https://{{if(data.useSandbox, 'sandbox-quickbooks', 'quickbooks')}}.api.intuit.com/v3/company/{{connection.realmId}}/companyinfo/{{connection.realmId}}",
"headers": {
"authorization": "Bearer {{connection.accessToken}}",
"accept": "application/json"
},
"response": {
"uid": "{{connection.realmId}}",
"metadata": {
"type": "text",
"value": "{{body.CompanyInfo.CompanyName}} ({{body.CompanyInfo.Country}})"
},
"data": {
"country": "{{body.CompanyInfo.Country}}"
}
},
"log": {
"sanitize": [
"request.headers.authorization"
]
}
},
"invalidate": {
"url": "https://{{if(data.useSandbox, 'sandbox-quickbooks', 'quickbooks')}}.api.intuit.com/v2/oauth2/tokens/revoke",
"headers": {
"authorization": "Bearer {{connection.accessToken}}"
},
"log": {
"sanitize": [
"request.headers.authorization"
]
}
}
}```