Authenticate with Concur Beta

You can authenticate with Concur to create your own instance of the Concur element through Cloud Elements or through APIs. Once authenticated, you can use the element instance to access the different functionality offered by the Concur platform.

Authenticate Through the UI

Use Cloud Elements to authenticate with Concur and create an element instance.

  1. Sign in to Cloud Elements, and then search for Concur Beta in our Elements Catalog. Search
  2. Hover over the element card, and then click Authenticate. Create Instance
  3. Enter a name for the element instance.
  4. Complete the Instance Configuration parameters. See Parameters for information about each parameter.
  5. Click Create Instance.
  6. Provide your Concur credentials, and then allow the connection.

After successfully authenticating, we give you several options for next steps. Make requests using the API docs associated with the instance, map the instance to a virtual data resource, or use it in a formula template.

Authenticate Through API

Authenticating through API is a multi-step process that involves:

Getting a Redirect URL

Use the following API call to request a redirect URL where the user can authenticate with the vendor. Replace {keyOrId} with the element key, concur.

GET /elements/{keyOrId}/oauth/url?apiKey=<api_key>&apiSecret=<api_secret>&callbackUrl=<url>&siteAddress=<url>

Query Parameters

Query Parameter Description
apiKey The key obtained from registering your app with the provider. This is the Client ID that you recorded in API Provider Setup section.
apiSecret The client secret obtained from registering your app with the provider. This is the Client Secret that you recorded in API Provider Setup section.
callbackUrl The URL that will receive the code from the vendor to be used to create an element instance. This is the Callback URL that you recorded in API Provider Setup section.

Example cURL

curl -X GET
-H 'Content-Type: application/json'
'https://api.cloud-elements.com/elements/api-v2/elements/concur/oauth/url?apiKey=fake_api_key&apiSecret=fake_api_secret&callbackUrl=https://www.mycoolapp.com'

Example Response

Use the oauthUrl in the response to allow users to authenticate with the vendor.

{
"element": "concur",
"oauthUrl": "https://www.concursolutions.com/net2/oauth2/Login.aspx?scope=LIST%2CCONFIG%2CATTEND%2CERECPT%2CEXPRPT%2CTRVPRF%2CTRVREQ%2CUSER%2CTWS&response_type=code&redirect_uri=https%3A%2F%2Fhttpbin.org%2Fget&state=concur&client_id=UPjRvqOyYz9hDdWLLLLuQV"
}

Authenticating Users and Receiving the Authorization Grant Code

Provide the response from the previous step to the users. After they authenticate, Concur Beta provides the following information in the response:

  • code
  • state
Response Parameter Description
code The Authorization Grant Code required by Cloud Elements to retrieve the OAuth access and refresh tokens from the endpoint.
state A customizable identifier, typically the element key (concur) .

Authenticating the Element Instance

Use the /instances endpoint to authenticate with Concur Beta and create an element instance. If you are configuring events, see the Events section.

To create an element instance:

  1. Construct a JSON body as shown below (see Parameters):

            {
              "element": {
                "key": "concur"
              },
              "providerData": {
                "code": "<AUTHORIZATION_GRANT_CODE>"
              },
              "configuration": {
                "oauth.api.key": "<CONCUR_KEY>",
                "oauth.api.secret": "<CONCUR_SECRET>",
                "oauth.callback.url": "<CALLBACK_URL>"
              },
              "tags": [
                "<Add_Your_Tag>"
              ],
              "name": "<INSTANCE_NAME>"
            }
    
  2. Call the following, including the JSON body you constructed in the previous step:

    POST /instances
    
  3. Locate the token in the response and save it for all future requests using the element instance.

Example cURL

curl -X POST \
  https://api.cloud-elements.com/elements/api-v2/instances \
  -H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
  -H 'content-type: application/json' \
  -d '{
    "element": {
      "key": "concur"
    },
    "providerData": {
      "code": "0_mG9HpbmXfGi3gIQHlWNUbnHP0aOlN"
    },
    "configuration": {
         "oauth.api.key":"UPjRvqOyYz9hDdWLLLLuQV",
          "oauth.api.secret":"GNnU6D7uvWMjOyOEsU7uL1Xc4iaEdEOa",
          "oauth.callback.url":"https://mycoolapp.com"    },
    "tags": [
      "Test"
    ],
    "name": "ConcurInstance"
  }'

Parameters

API parameters are in code formatting.

Heading Heading Data Type
'key' The element key.
concur
string
Name
name
The name for the element instance created during authentication. Body
OAuth API Key
oauth.api.key
The Key from Concur. string
OAuth API Secret
oauth.api.secret
The Secret from Concur. string
Filter null values from the response
filter.response.nulls
Optional. Determines if null values in the response JSON should be filtered from the response. Yes or true indicates that Cloud Elements will filter null values.
Default: true.
boolean
Events Enabled
event.notification.enabled
Optional. Identifies that events are enabled for the element instance.
Default: false.
boolean
Event Type
event.vendor.type
Optional. identifies the type of events enabled for the instance. The Concur Beta element supports only polling. string
Event Notification Callback URL
event.notification.callback.url
Where do you want CE to send the events that we generate?. string
Callback Notification Signature Key
event.notification.signature.key
Optional. A user-defined key for added security to show that events have not been tampered with. string
Event poller refresh interval (mins)
event.poller.refresh_interval
A number in minutes to identify how often the poller should check for changes. number
Configure Polling
"event.poller.configuration"
reports
"event.poller.configuration": "{"reports"...}" (see Events)
Optional
The Concur reports. resource available for polling.
JSON object
tags Optional. User-defined tags to further identify the instance. string