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

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!

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

API docs for this parameter can be found here: Applications

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

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())

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

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