JavaScript
import Morphik from 'morphik';
const client = new Morphik({
apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
});
const response = await client.cloud.rotateAppToken();
console.log(response);curl https://api.morphik.ai/apps/rotate_token \
-X POST \
-H "Authorization: Bearer $MORPHIK_API_KEY"{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Rotate App Token
Rotate the token for an existing application.
POST
/
apps
/
rotate_token
JavaScript
import Morphik from 'morphik';
const client = new Morphik({
apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
});
const response = await client.cloud.rotateAppToken();
console.log(response);curl https://api.morphik.ai/apps/rotate_token \
-X POST \
-H "Authorization: Bearer $MORPHIK_API_KEY"{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Query Parameters
Application ID to rotate
Application name to rotate
Number of days until the new token expires
Required range:
x >= 1Response
Successful Response
The response is of type Response Rotate App Token Apps Rotate Token Post · object.
Was this page helpful?

