Get Token

When you want to get a token for the next connector call, insert a Connector Shape and follow all the steps described in Create an Operation. The Get Token process can be run in the environment periodically to get or refresh a token.

The token can be stored in Environment Extensions for other processes in the same environment to use. The AtomSphere API connector should be used to write the token to the Environment Extensions. Document cache is not suitable as the cache would not remain active throughout multiple processes executions.

Getting JWT Token

Upon receiving a valid token response, which is a JSON response containing the JWT token, build the Environment Extensions update request and update the token in the environment by the AtomSphere API connector.

Getting OAuth Token

A decision shape is inserted to check if the current access token or refresh token is still valid. If it is invalid, a 401 error is returned and you should reset the document properties “OAuth Access Token” and “OAuth Refresh Token” to empty and retry getting the token again.

Upon receiving a valid token response, which is a JSON response containing access token and refresh token, build the Environment Extensions update request and update the tokens in the environment by the AtomSphere API connector.

 

In Step 2, the setup should look like this:

The last field 'Operation' (which relates to Step 7 in the common flow) has the following options: