Method RegenerateApiToken
RegenerateApiToken(String, String)
Regenerate API token.
Declaration
string RegenerateApiToken(string connectionId, string tokenId)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
System.String | tokenId | The token id. |
Returns
Type | Description |
---|---|
System.String | Return the regenerate api token. |
Remarks
- This method can be used to delete the old JWT token and create a new one at the same time. The old JWT token can no longer be used after this method call.
Examples
POST https://YourServerName/InfoShare/Json/Authentication/RegenerateApiToken
Example for a regenerate api token.{
"connectionId": "6bc655a4-c079-4535-a733-f259e3232a3a",
"tokenId": "7bc655a4-c079-4535-a733-f259e3232a3b"
}
Response:
{
"RegenerateApiTokenResult": "eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2MjU2NDQ4MjIsImV4cCI6MTYyNTYzNzAwMCwiaWF0IjoxNjI1NjQ0ODIyLCJ0b2tlbklkIjoiMWIwZjhkMWItNGQxNy00YzAxLTgwMzQtNmE2MGE1ZDYyZDkzIiwidXNlcm5hbWUiOiJkY2lhZG1pbiIsInVzZXJJZCI6IjAxMDBhMDAzLTM4YTctMTFkOC1hOTAyLTAwNTBiZjQyN2U4ZiIsImNyZWF0ZURhdGUiOiIyMDIxLTA3LTA3VDEwOjAwOjIyIiwiZXhwaXJhdGlvbkRhdGUiOiIyMDIxLTA3LTA3VDA3OjUwOjAwIiwiY29ubmVjdGlvbklkIjoiNDU1ZTdhY2YtNzAwNi00YzJkLWFkYzktMDNjOTdiMzA2NzBkIiwidG9rZW5OYW1lIjoiVGVzdCIsInRva2VuVHlwZSI6ImFwaXRva2VuIn0.v0s7XKlttJe9kiqM24K37Cim16x6V0THv2_Ww_Ctv5k"
}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |