Hi I tried the exact steps listed here yet I'm getting the following error message when I try to get a bearer token to authorize my API calls:
"{ "fault": { "faultstring": "Invalid ApiKey", "detail": { "errorcode": "oauth.v2.InvalidApiKey" } } }"
Please help me out as we are unable to access any Opentext APIs without the bearer tokens
You can verify with Postman and see if you can get a bearer token that way. Procedure:
First try with username and password, as you can later on also use this in a OIDC/PKCE connection flow (using public client ⇒ this is the standard when doing browser / client side connections).
If you want more in depth information on how to set up and test a connection (e.g. also to your developer organization), please refer to the Developer Tutorial. In this developer tutorial, it helps you set up your VS Code Development Environment AND create a connection to your developer organization. This is also a good test, since if the developer organization connection doesn't work, chances are your app connection wouldn't either. Beware that in the developer tutorial it says you should connect to na-1-dev. You should choose ca.
I followed these exact steps but I'm still getting the following error- { "error": "unauthorized tenant", "error_description": "authentication failed "}
@A Dey, to validate the CA region is working, I have set up a brand new CA region trial account, created a simple application (which I can share if you like) in VS Code with OpenText Thrust Studio extension pack installed, deployed it to the CA region and tenant, and I have tested with both password and client_credentials grant types. This all works.
Beware though that for password grant type you need to add the user to your app in the tenant you deployed it to. More specifically, in Admin Center under /<organization name>/Tenants/<tenant name>/Apps/<app name>/users, make sure to add your test user (the organization user password doesn't work by default and it is also best you use application users) by clicking [+add] and filling an email address (of the test user) AND selecting ims_user as role. You should then get a user activation email in the user's email inbox. After setting user information and password, authenticating (getting a bearer token) with password grant type using the test user email and password should work.
Lastly, if you really want to use your organization user for password grant type, you will need to reset the password at the tenant level (as tenant level is specific and not set when creating an new trial/organization). To do that, just navigate in Admin Center to the tenant (go inside the tenant) and if you then click your profile, you should get the option to reset your tenant password, like so:
If things still don't work with the above, I recommend you create a new trial account to verify that it is not a problem with the account. If the other account works, you can let us know and we can investigate the original on. If it doesn't, you are most likely doing something wrong.
I am using US region and forget about using API I can't even get the bearer token in the way you previously showed. If you want I can provide all the IDs and passwords you want and you can try it out yourself, I just want to get a bearer token and access the SMS outbound API. Why is the entire process so un-intuitive? Its supposed to be just a simple API call mate.
Let me know if you want me to share the creds in some secure medium. Just help me make an API call that gives 2xx codes, I'm fed up with all the different errors its throwing.
@A Dey, from the ticket I was assuming you we in CA (this thread starts with CA region). If US, replace all ca with us.
Beyond that, you are right, this should be simple. Let's set up a call to go through the steps together. Can you please send me an email from your professional email address so that I can send out a meeting invitation? If available now, we can do this right away.
Hi @gvicari . I am facing some issues while trying to access the API. Can we set a meeting right away? I need this for the hackathon.