Here I am going to provide details steps for how to configure email listener using GMAIL with OAUTH authentication.
Pre-requisite you should have SMTP configurations set up and emails in Maximo are already working.
You may refer IBM documentation for this - Configuring SMTP.
So once SMTP is properly set up and email sending through Maximo applications works fine , we will need to move to prepare and get OAUTH parameters like Refresh Token , Client ID , Client Secret etc. for email address being used for email listener with OAUTH protocol.
Here I will cover steps for getting these details for Gmail account.
First step is to have email account : Create a new Gmail account / you may use your existing Gmail account.
Next steps is work with Google Cloud API to configure and generate/ get required parameters like Client ID , Client Secret and Refresh token for above Gmail account using cloud API library services.
Broadly this can be done using following steps :
1. Set up project using Google cloud dashboard logging in with your Gmail account.
2. Next enable GMAIL API under your project
3. Once API is enabled , credentials need to be created for connecting to account via GMAIL API
After hitting Save and continue , you should provide scope for API access /authorization
Now you should be able to download details in JSON format or can copy it from google cloud dashboard like Client ID , Client Secret.
Now next step is to get refresh token for this Email configuration/ client ID using postman client :
To get refresh token first we need to get code to establish session with api
URL : Hit URL from browser in below format and within browser while redirecting it will generate CODE
It should ask you to login using your email account
Then you have to click "continue" couple times and it will redirect to your maximo login page / redirect URI provided during credentials creation.
After successful login , you can try putting same above URL again and proceed is similar manner as session was already established this time it will automatically login maximo and URL
will now have auth code
Postman POST request should be done to get refresh token :
URL : https://oauth2.googleapis.com/token?
Parameters - client_id , client_secret ( values received in above steps)
redirect_uri : - your maximo url e.g. https://host:port/maximo ( which is used as redirect URL during credentials
creation )
grant_type : authorization_code
prompt = consent
access_type = offline
This request should give you refresh time on first iteration.
Once you get refresh token you should be able to configure Email Listener within Maximo.
This will now complete Email Listener configuration using OAUTH.
I will continue and update this post for additional configurations like Email Interaction and sample PO workflow where PO status will be changed via email response being listened and processed by email listener.
No comments:
Post a Comment