This article explains how the display language configured in the Okta tenant's Brand settings can affect the language of API responses when an Okta API service application with OAuth for Okta implementation interacts with Okta APIs.
- OAuth2.0 - OAuth for Okta
- Okta Brand
- Display Language
- API Service Application
When an Okta API Service application makes a request to Okta APIs with OAuth for Okta implementation, the language of certain API responses will be influenced by the display language set within Okta Brand settings. This means if the API URL contains the domain (Okta or custom domain) of the brand that is configured for a specific language (for example, French), certain API responses, specifically error messages, will be translated into that language.
Key Considerations:
- Error Responses Only
The translation will only apply to error responses (for example, validation errors, authorization failures, etc.). The properties and values within a successful API response object will not be translated and will remain in their original form (typically English).
- API URL and Brand Association
The localization of API responses only occurs for API calls made to the Okta API URL that contains the domain (Okta or custom domain) of a specific brand, where the display language was changed. If there are multiple brands with custom domains, only the API calls to the specific URL associated with the modified brand will reflect the language change.
To observe and verify this behavior, follow these steps:
- In the Okta Admin Console, navigate to Customizations > Brands.
- Choose the brand associated with the Okta API URL used for API requests. If the API requests are directed to the default Okta Org URL (for example, OrgName.okta.com), select the corresponding default brand.
- On the Settings tab of the selected brand, locate the Display language section and click Edit.
- From the Language dropdown menu, select a different language (for example, German, Spanish, or Japanese).
- Click Save to apply the new display language.
- After changing the display language, make an API request with OAuth for Okta with service application implementation (by intentionally triggering an error, incorrect scope, or an attempt to access a forbidden resource). It should be observed that the error messages in the API response are now localized to the language selected in the Brand settings. However, a successful API response will still contain properties and values in the default language.
