Dec 12, 2022

How to configure Postman to call Infor ION API

In this post, I'm going to explain the step-by-step approach to configuring the popular development tool Postman to test/execute Infor ION API. Even though this is straightforward, better to have a document to do quickly whenever you need it, to save time. 

As you know Infor ION APIs use OAuth2.0 (The OAuth 2.0 Authorization Framework) for authorization and Bearer Tokens which are the predominant type of access token.

Configuration from the Infor ION API

Create Postman as Authorized Apps in Infor ION.

Note: To complete the below steps you must be in the IONAPI-Administrator security role.
  1. Goto Infor ION API -> Authorized Apps
  2. Click on  + icon on the left top (Add New App)


  3. Give it a name, description select type as "Backend Service", then Save 

  4. After save, we can see additional information like, Client ID, Secret, Associated Events etc. 
  5. Click on the Download Credentials button (next to the Secret text box).
  6. In the Download Credentials Dialog, toggle on the Create Service Account.
  7. Select a user from the Full Name text box. This is required because we are configuring this as Backend service and need impersonation. Or You will get Illegal impersonation attempt (error: 163) error. 


  8. A file will be created(eg. PostmanClient.ionapi) and downloaded to your local Download folder. After you download, store these credentials securely. 
If you open the file, can see it is a JSON file and contains several properties.  Infor API Admin guide defines those properties as follows;
  
PropertyDescription
tiTenant identifier
cnApplication name
ciClientID that must be passed to the Authorization
csServerClient Secret to pass to the Authorization Server
iuBase URL for calling the ION API Gateway for this tenant/environment
puBase URL for calling the authorization server for this tenant/environment
oaPath to append to "pu" to create the Authorization URL
otPath to append to "pu" to create the Access Token URL
orPath to append to "pu" to revoke a previously obtained token
SAAKService Account Access Key
SASKService Account Secret Key

Configuration in Postman

  1. On the Authorization tab in the Postman, select Type as OAuth 2.0


  2. On the right-hand side , under the Configure New Token-> Configuration Options, enter parameter values as below.  
  3. Token NameName it as you want
    Grand TypePassword Credentials
    Access Token URL value of "pu"+"ot" from the .ionapi file
    Client IDvalue of "ci" from the .ionapi file
    Client Secretvalue of "cs" from the .ionapi file
    Usernamevalue of "saak" from the .ionapi file
    Passwordvalue of "sask" from the .ionapi file
    Scope[blank]
    Client AuthenticationSend as Basic Auth header

  4. Click on the Get New Access Token button. 
  5. You will the success mesage like this.
  6. In the next window, click on the Use Token
  7. Now Postman client is ready to call Infor ION API.



No comments:

MEC: How to Set Message Counter for EDI Message

When you sending/creating EDI messages it is necessary to include unique message interchange number. This is to ensure each message that we ...