Illegal character in authority at index 8


#1

Hello Forum,
I’m facing this issue that I have been trying to solve for alot of time now. I have tried changing my organization URL again and again but keep getting these error. First I was facing “Typo in url”, I changed some things and right now I’m having this error

{
  "message": "Internal Server Error",
  "errorMessage": "Illegal character in authority at index 8: https://dev-194454.oktapreview.com # i.e. https://dev-123456.oktapreview.com/api/v1/users/testuser",
  "timestamp": "09-02-2019 11:36:11"
}

okta:
  client:
    connectionTimeout: 30 # seconds
    orgUrl: https://dev-194454.oktapreview.com
    proxy:
      port:
      host:
      username:
      password:
    token: 00sometoken00
    requestTimeout: 0 # seconds
    rateLimit:
      maxRetries: 4

I am trying to connect Okta client through spring boot. Here is my connection code

public com.okta.sdk.client.Client getClient() {
        com.okta.sdk.client.Client client = Clients
                .builder()
                .setOrgUrl(orgUrl)
                .setClientCredentials(new TokenClientCredentials(token))
                .build();
        return client;
    }

Then I am trying to get this user registered in my okta account from this client

Client client = oktaClient.getClient(“testuser”);

Any help would be appreciated.