<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content

Error "Url contains invalid characters" Occurs when Non ASCII Characters are Used in Custom API Action or API Connector Card URLs in Okta

Workflows
Okta Classic Engine
Okta Identity Engine

Overview

Okta Workflows generates an error when creating a connection or performing an action with Custom API Action or API Connector cards when the URLs contain non-American Standard Code for Information Interchange (ASCII) characters because URLs strictly require ASCII format. Encoding all non-ASCII characters in the API query resolves this issue and allows successful API connections. This may be seen when attempting to connect to an API to perform an action or create a connection, and the following error is returned:

 

"message": "UrlError { details: \"Url contains invalid characters.\" }",

 

Error Message 

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • Okta Workflows
  • Custom API Action
  • API Connector card

Cause

Okta Workflows supports UTF8 characters. ASCII is a subset of UTF8.  
According to RFC1738, only ASCII characters can be utilized within a URL, and all other UTF8 characters must be encoded. 

Solution

How are non-ASCII characters resolved in Okta Workflows API URLs?

 

Encode all non-ASCII characters in an API query. Identifying non-ASCII characters presents challenges because some appear identical to ASCII characters. Review the following example demonstrating how non-ASCII characters can appear identical to ASCII characters.

  • Βrown: The "B" character is non-ASCII
  • Brown: The "B" character is ASCII

Confirm the problem by manually typing the URL string and locate the source input causing the non-ASCII characters in the flow.

  1. Type out the full URL string by hand to ensure the URL only uses ASCII characters.
  2. Locate the source input causing the non-ASCII characters in the flow once the manual URL confirms the issue.

Leverage the Encode Component card to identify the non-ASCII characters or to encode and then use the non-ASCII values inside the URL.

Encode Component card

Loading
Error "Url contains invalid characters" Occurs when Non ASCII Characters are Used in Custom API Action or API Connector Card URLs in Okta | Okta Support