Configure a REST message with OAuth

You can configure an outbound REST message to send OAuth credentials with the request.

Before you begin

Role required: web_service_admin and oauth_admin
Before starting this procedure, ensure:
  • There is a REST Message record that you want to configure to use OAuth.
  • There is an OAuth provider set up in the OAuth application registry with the OAuth client information to use.
  • The OAuth provider has an associated OAuth 2.0 profile.
  • The REST message HTTP Methods are not configured to use a MID Server.
Note: Ensure any scripts that call this REST message use the RESTMessageV2 API. The RESTMessageV2 API is required to send authenticated REST messages via scripts.

Procedure

  1. Navigate to System Web Services > Outbound > REST Message.
  2. Select a REST message record.
  3. In the Authentication type field, select OAuth 2.0.
  4. In the OAuth profile field, select the OAuth 2.0 profile that specifies the credentials you want to send.
  5. Right-click the form header and select Save.
    An info message appears at the top of the form indicating that you must request a new OAuth token.
  6. Click the Get OAuth Token related link.
    Depending on your OAuth provider, a separate window from your provider may appear asking for confirmation before providing a token. Complete any steps required by the provider to obtain the token.

What to do next

Test the REST message to ensure you receive the expected response. You can optionally specify different authentication settings for each HTTP method related to this REST message, overriding the parent REST message settings.