The SCIM Rotate Token Start method wraps the SCIM Rotate Token Start API endpoint. The organization_id will be automatically inferred from the logged-in Member's session. This method cannot be used to start token rotations for SCIM connections in other Organizations.
SCIM Rotate Token Start
Method parameters
connection_id* string
The ID of the SCIM connection.
Response fields
request_id string
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
status_code int
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
connection object
A SCIM Connection connection belonging to the organization (currently limited to one).
import { Text, TouchableOpacity, View } from 'react-native';
import { useStytchB2BClient } from '@stytch/react-native/b2b';
export const RotateSCIMTokenStart = () => {
const stytch = useStytchB2BClient();
const rotateSCIMTokenStart = () => {
stytch.scim.rotateStart('scim-connection-test-cdd5415a-c470-42be-8369-5c90cf7762dc');
};
return (
<View>
<TouchableOpacity onPress={rotateSCIMTokenStart}>
<Text>Start SCIM Token Rotation</Text>
</TouchableOpacity>
</View>
);
};
RESPONSE 200
200
{
"connection": {
"organization_id": "organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931"
"connection_id": "scim-connection-test-cdd5415a-c470-42be-8369-5c90cf7762dc"
"status": "active",
"display_name": "My SCIM Connection"
"identity_provider": "okta"
"base_url": "https://test.stytch.com/v1/b2b/scim/scim-connection-test-cdd5415a-c470-42be-8369-5c90cf7762dc"
"bearer_token_last_four": "sdko"
"bearer_token_expires_at": "2029-03-20T21:28:28Z
"next_bearer_token": "8TqbGcJyFFLSNveQPGZ861xSE2B7CPtC2gnyasAIbDiUrcjn"
"next_bearer_token_expires_at": "2030-03-20T21:28:28Z"
},
}
RESPONSE 401
200
{
"status_code": 401,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "unauthorized_credentials",
"error_message": "Unauthorized credentials.",
"error_url": "https://stytch.com/docs/api/errors/401"
}
RESPONSE 403
200
{
"status_code": 403,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "session_authorization_error",
"error_message": "The Member is not authorized to perform the requested action on that resource.",
"error_url": "https://stytch.com/docs/api/errors/403"
}
RESPONSE 429
200
{
"status_code": 429,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "too_many_requests",
"error_message": "Too many requests have been made.",
"error_url": "https://stytch.com/docs/api/errors/429"
}
RESPONSE 500
200
{
"status_code": 500,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "internal_server_error",
"error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
"error_url": "https://stytch.com/docs/api/errors/500"
}