We have detected an error from the managed system. Error Received: [ConnectorError] Exception occurred while generating access token. when trying to connect web service saas to oracle

Hi I’m getting this error when trying to test connection.

We have detected an error from the managed system.

Error Received:

[ConnectorError] Exception occurred while generating access token.

in postman I’m able to get the token.

Authentication Type: OAuth 2.0
Grant Type: Client Credentials

Operation Name
Authentication
Operation Type
Custom Authentication
Request Type API
HTTP Method POST
Content-Typeapplication/x-www-form-urlencoded
Root Path
$
Success Codes 200
access_token access_token

Operation Name
Test
Operation Type
Test Connection
Request Type API
Context URL /admin/v1/Users
HTTP Method GET
Authorization $application.access_token$
Root Path
$
Success Codes 200

HI,

When you are using custom authentication, you should mention custom authentication on base configuration settings in webservices source.

-Abhinov

Hey, can you change the format to include Bearer as well. From the screenshot you shared it is a bearer token. Hence while passing the token it should be:

Authorization = Bearer $application.access_token$

Also, as @Abhinov7 mentioned make sure that Authentication is set as Custom Authentication.

Let me know if this works for you.:slight_smile:

Hi, changed Authentication type in connection settings to custom authentication and added Authorization = Bearer $application.access_token$ in the test operation. im just getting back

I am facing the same issue. I can get the users in Postman using the same settings.

My hunch says this could be related to the firewall. Coming from the IIQ world, I remember facing something like this, and it finally was a firewall issue.

I could be wrong, but I will check internally.
Please do the same and keep us posted.

Can you change Status code in custom authentication from 200 to 2**
Also can you store the received access_token in accesstoken. Because this is the variable that is encrypted in source. Then use this variable in other operations.

1 Like

Hi @udayputta,

made the two changes -

  1. In my case, I already had the 2** as the success codes
  2. when access_token is changed to accesstoken, I see the response in the mapping

I see this as an improvement. But I think, I am getting more than the access token in the attribute path(key id and key). Thank you. However, my “review & test” still fail with the same message as @Shipuaa

any suggestions please?

After you see this you need to update your header in other operations like this
Bearer $application.accesstoken$. Did you do that as well?

nope, I did not do it until I saw your response.

however, I just did it and still could not connect.

still getting the same error. but i do a see an improvement as @vbdm1 said.

I got it to store in the test operation too but still the same error

I was able to test it successfully when I copied everything from the Postman code snippet. All the header keys, values, urls, etc.

with things like content_type failed and when in Postman it was Content-Type and it worked.

So, I would suggest use everythign as-is from Postman

how did include this

If you are asking how to include them:

still getting same error. if change key to Authorization and not accesstoken in test it doesnt store the token