CommEngine API Gateway

How to use and integrate CommEngine API? How will it work?

 

Our current pattern:

CommEngine Tool Structure

 

Suggested Pattern:

 

We will use a middle-ware which will authenticate token and protect our core private API.

 

For example:
Ajkerdeal wants API access from our tool. So integration process will be:


Step 1:

Ajkerdeal will validate their user and generate a secured token.

Step 2:

Ajkerdeal will send user details along with that token and specific pageid.

Step 3:

CommEngine will validate that token and process that user details.

Step 4:

CommEngine will ask the specific pageid’s accesstoken for that user(For New user/tenant)

Step 5:

Ajkerdeal will send that required accesstoken(For New user/tenant)

Step 6:

CommEngine will execute the further required processes.

 

So, there are the basic steps. This is how Ajkerdeal can integrate CommEngine API.
For better understanding, We are explaining two patterns.


For New user:

Step 1:

Go to Vtiger. Click on CommEngine. Now login via Ajkerdeal.
Ajkerdeal will authenticate that user. If pass then
Ajkerdeal will generate a secured token using STS. If done then
Ajkerdeal will collect Fb Pageid via FB integration using FB App. If done then
Ajkerdeal will call CommEngine API. It will be a post method.
(Token will be in url header)
i.e:

[ user:{ name:"", mobile:"", . . }, pageid:"" ]

 

Step 2:

CommEngine will validate the header token. If okay then
CommEngine will identify that user. If new user found then
CommEngine will return false.

Step 3:

Ajkerdeal will collect that specific page access token for that PSID(user). That user need to be an Admin of that page.(CommEngine will share their AppID and App Secret Token). Then
Facebook will give an Access Token with specific permissions.
Ajkerdeal will send all the permissions along with access token to CommEngine.

Step 4:

CommEngine will execute the further process.

 

 

 

For regular user:

 

Step 1:

Go to Vtiger. Click on CommEngine. Now login via Ajkerdeal.
Ajkerdeal will authenticate that user. If pass then
Ajkerdeal will generate a secured token using STS. If done then
Ajkerdeal will collect Fb Pageid via FB integration using FB App. If done then
Ajkerdeal will call CommEngine API. It will be a post method.
(Token will be in url header)
i.e:

[ user:{ name:"", mobile:"", . . }, pageid:"" ]

 

Step 2:

CommEngine will validate the header token. If okay then
CommEngine will identify that user. If regular user found then
CommEngine will return true and execute further process.

 

Thus Ajkerdeal can use CommEngine API.