# Api validation failed: rotationType\\nrotationType: The field has an invalid value

**URL:** <https://devforum.okta.com/t/api-validation-failed-rotationtype-nrotationtype-the-field-has-an-invalid-value/34099>\
**Category:** API\
**Created:** [August 10, 2025, 6:08pm UTC](https://devforum.okta.com/t/api-validation-failed-rotationtype-nrotationtype-the-field-has-an-invalid-value/34099 "2025-08-10T18:08:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.kahn](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@justin.kahn](https://devforum.okta.com/u/justin.kahn)\
**Post date:** [August 10, 2025, 6:08pm UTC](https://devforum.okta.com/t/api-validation-failed-rotationtype-nrotationtype-the-field-has-an-invalid-value/34099/1 "2025-08-10T18:08:16Z")

</div>

I am trying to update an App (adding a redirect URI) via API. I have been using the same code for a while, but this time, I got the following error:

`Okta HTTP 400 E0000001 Api validation failed: rotationType\nrotationType: The field has an invalid value`

In case it is helpful, this is via the python SDK.

I am not changing anything about rotation, but hoping someone could point me in the right direction of what field in my API call is the problem - I looked in the docs, but I don’t see anything about nrotationType.

Thanks!

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [August 11, 2025, 3:11pm UTC](https://devforum.okta.com/t/api-validation-failed-rotationtype-nrotationtype-the-field-has-an-invalid-value/34099/2 "2025-08-11T15:11:41Z")

</div>

rotationType should be either `ROTATE` or `STATIC` and is a setting for `refresh_token`

API docs for this parameter can be found here: [Applications](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Application/#tag/Application/operation/createApplication!path=4/settings/oauthClient/refresh_token/rotation_type&t=request)

More info about refresh token rotation can be found in our docs here: [https://developer.okta.com/docs/guides/refresh-tokens/main/#refresh-token-rotation](https://developer.okta.com/docs/guides/refresh-tokens/main/#refresh-token-rotation)

---

<div class="post-metadata">

**Author:** ![justin.kahn](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@justin.kahn](https://devforum.okta.com/u/justin.kahn)\
**Post date:** [August 11, 2025, 10:55pm UTC](https://devforum.okta.com/t/api-validation-failed-rotationtype-nrotationtype-the-field-has-an-invalid-value/34099/3 "2025-08-11T22:55:27Z")

</div>

Thanks! I was able to fix it by overriding the value, but for reference, I do believe there is an issue either in the API or the SDK. Here is a minimal working example. Even just getting the app and sending a PUT request with the same body will raise the HTTP 400 error above. I am using okta python SDK 2.9.13 for reference.

import asyncio  
import os

from okta.client import Client as OktaClient

async def main():  
app\_id = os.environ[“OKTA\_APPLICATION\_ID”]  
app, resp, err = await okta\_client.get\_application(app\_id)  
\_, \_, err = await okta\_client.update\_application(app\_id, app)  
print(err)

if **name** == “ **main** ”:  
config = {  
“orgUrl”: os.environ[“OKTA\_ORG\_URL”],  
“token”: os.environ[“OKTA\_API\_TOKEN”],  
}  
okta\_client = OktaClient(config)  
loop = asyncio.get\_event\_loop()  
loop.run\_until\_complete(main())

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [August 12, 2025, 4:28pm UTC](https://devforum.okta.com/t/api-validation-failed-rotationtype-nrotationtype-the-field-has-an-invalid-value/34099/4 "2025-08-12T16:28:46Z")

</div>

oh, you can reproduce the same issue with a direct API call?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [September 11, 2025, 4:29pm UTC](https://devforum.okta.com/t/api-validation-failed-rotationtype-nrotationtype-the-field-has-an-invalid-value/34099/5 "2025-09-11T16:29:43Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
