Pre-configuration and required information.
Before anything can be set up in SmartConnect, some information will need to be gathered from the service api. The redirect url for SmartConnect.com will also need to be added to the service.
Required information from the service api:
- Client id and client secret
- Authorization URL
Example – https://example.com/oauth/authorize?client_id=XXX&scope=XXX&redirect_uri=XXX&state=XXX
- Access Token URL
Example – https://example.com/oauth/v1/access-tokens
- Refresh Token URL
Example- https://example.com/oauth/v1/refresh-tokens
- Scope
Adding the SmartConnect redirect url:
- Navigate to System>>API Setting on the main navigation. In the OAuth Redirects section, the redirect url that will need to be added to the authentication settings will be the Generic REST OAuth Redirect Url. This is how the user is returned to SmartConnect after the authorization process has been completed.
OAuth Settings within SmartConnect Rest Service Maintenance
- OAuth Settings will need to be configured by navigating to Maintenance>>REST Services>> on the main navigation and then click the edit service button for the rest service setup in the first section.
- Navigate to OAuth Settings within the rest navigation page. This page stores all the OAuth configuration for the service being used.
-
- Authorization Url – Enter this in the format of https://example.com/oauth/authorize?client_id=<clientid>&redirect_uri=<redirect>&scope=<scope>&state=<state> The values inside the less than/greater than brackets will be replaced with values held within the connection created later.
-
- Access Token Url – Enter the access token url defined in the service api.
-
- Scope – Enter the required scope defined by the api.
-
- State – Enter <serviceid>. This is used to link the connection and rest definition.
-
- Refresh Method- Choose the method that matches what is required in the api.
-
- Token Refresh Length- Enter the refresh length required by the api.
-
- Token Refresh Units- Choose the unit that matches the refresh length from the api.
-
- Refresh Token Url- Enter the refresh token url defined in the service api.
Connector Setup using OAuth
- From the main Navigation Menu, select Connections.
- On the Connections page, click the Create Connection button.
- Click the Rest Service that was named and had an image set in the first section.
- Enter a name for the connection.
- Enter the client id and client secret. Scope and State will be populated from the rest definition setup automatically.
- Click the Connect button. This will direct you to the services login page and begin the authorization process. Follow through the process and once successfully logged in, you will be redirected back to the connector setup page in SmartConnect.
- Click Save to finish the connector setup.