Available authorizations Server

dankochan
dankochan Member
edited August 7 in Services #1

I have made my organization on us server but the only available server available are na servers and every time i try to autherize api i get authentication error, is it due to different servers or i am entering my creds wrong?

Best Answers

  • jpluimers
    jpluimers E Community Moderator
    #2 Answer ✓

    Very similar to https://forums.opentext.com/forums/developer/discussion/312618/cant-access-any-api

    When using the developer.opentext.com website to test the APIs, the for now authorization only can be done against the Build and Test server na-1-dev.One option is to download the openapi file and import that in a tool like Postman and execute from there.See also this comment in a similar discussion / question, https://forums.opentext.com/forums/developer/discussion/comment/968845#Comment_968845

  • Karen Weir
    Karen Weir E Community Administrator
    #3 Answer ✓

    Thank you for reporting your experience. We have resolved the issue and updated the instructions.

Answers

  • jpluimers
    jpluimers E Community Moderator
    #4 Answer ✓

    Very similar to https://forums.opentext.com/forums/developer/discussion/312618/cant-access-any-api

    When using the developer.opentext.com website to test the APIs, the for now authorization only can be done against the Build and Test server na-1-dev.One option is to download the openapi file and import that in a tool like Postman and execute from there.See also this comment in a similar discussion / question, https://forums.opentext.com/forums/developer/discussion/comment/968845#Comment_968845

  • Karen Weir
    Karen Weir E Community Administrator

    We are working to improve the experience for authorizing in the site Swagger API.

    I will update our instructions when we have this resolved.

  • So has there been any progress on resolving this issue? I'm currently facing the same problem. I can't authorise my API, so I can't continue on my project..

  • Karen Weir
    Karen Weir E Community Administrator

    Have you tried the workaround that jpluimers provided @snowcrashcode ?

  • Yes I have. I imported the file and tried to authorize via Postman, but I'm getting the same error as when I try to authorize using DeveloperCloud. Unless I am mistaken, I believe that the issue stems from the fact that we selected the "US" region when creating our accounts. I have checked multiple times that I am inputting my credentials correctly. If I'm being mistaken, I will greatly appreciate a more detailed step-by-step guide on how to authenticate my API token, otherwise I won't be able to submit my product at all.

  • Shahid M
    Shahid M E Community Moderator

    Hi @snowcrashcode,

    I'm going to try to help you step by step. Since you've chosen US region, you want make sure both the Authentication API call and any of your service calls go to the US endpoint. Our swagger documentation is currently under rebuild (to add endpoints for all the regions), so you will not be able to authenticate on the swagger documentation pages.

    The alternate is to download the .json or .yaml and test the APIs in tools like Postman. You still have to make sure you put in the correct endpoints for the US region…

    For Authorization: https://us.api.opentext.com/tenants/{{tenantId}}/oauth2/token
    For Services:
    Capture: https://us.api.opentext.com/capture/cp-rest/v2
    CMS: https://us.api.opentext.com/cms
    and so on.

    On more thing, when putting in the credentials for Authorization make sure of the following…
    Auth Type: OAuth 2.0
    Grant type: Password Credentials
    Access Token URL: https://us.api.opentext.com/tenants/{{tenantId}}/oauth2/token (make sure to define a tenantId variable)
    Client ID: (this is the app confidential Client Id, and also make sure the app is assigned to the tenant)
    Client Secret: (this is the app Client Secret)
    Username: (this is the tenant Username)
    Password: (this is the tenant Password. You will obtain the tenant password when you reset the tenant password)

    Hope this helps. Let us know how it goes.

  • LazarescuA
    LazarescuA E Community Moderator

    Hello @snowcrashcode ,

    Here is the documentation to authorize:

    https://developer.opentext.com/services/developertools/developer-admin/documentation/authentication/1

    Basically you need to follow the password grant type as displayed in the cURL example:

    curl --location --request POST 'https://us.api.opentext.com/tenants/<TENANT ID>/oauth2/token' --header 'Content-Type: application/json' --data-raw '{
    "client_id": "<CLIENT ID>",
    "client_secret": "<CLIENT SECRET>",
    "grant_type": "password",
    "username": "<USERNAME>",
    "password": "<PASSWORD>"
    }'

    Just paste in the TENANT_ID and all others.

    NOTE: if you just created the Organization and Tenant, you need to understand that the Tenant password is different than the Org password and it is different than your OTConnect password. In Admin center we are trusting the OTConnect IDP so you get authenticated, but if you want to use the API to authenticate, then you will need your tenant password. If you never set it, it will probably be a random one.

    You can easily set it, just go into Admin Center, navigate to your Tenant and then, when inside the tenant, click on your Avatar menu and hit the Reset tenant password button. After you successfully reset it, use it in the above API call.

  • Hey all, whenever I try to reset the tenant password, I get the email and click the embeded link, I get the attached error "This confirmation link is no longer valid".

    I have made sure that it is the correct email address.

  • Shahid M
    Shahid M E Community Moderator

    Hi @snowcrashcode, it can sometimes take up to 5 min to send the password reset email. Can you please try again and wait a bit for the latest password reset email to arrive. Thanks.

  • Karen Weir
    Karen Weir E Community Administrator
    #13 Answer ✓

    Thank you for reporting your experience. We have resolved the issue and updated the instructions.

This discussion has been closed.