Enable OAuth with inbound REST
Using OAuth, you can pass a user ID and password once, and then use a token for subsequent REST requests instead of submitting credentials with each request.
Before you begin
The OAuth 2.0 plugin (com.snc.platform.security.oauth.is.active) must be active. For activation instructions, see Activate a plugin.
Role required: admin
About this task
OAuth reduces the number of times you submit user credentials. After authenticating once, you use a token for subsequent REST requests.
Procedure
Set the com.snc.platform.security.oauth.is.active system property to
true.Navigate to System OAuth > Application Registry.
Select New, then select Create an OAuth API endpoint for external clients.
Record the client_id and client_secret values to use when requesting an access token.
Note: This example uses the password grant type. You can also configure an OAuth API endpoint using other grant types. For more information, see OAuth Inbound.
Use a REST client, such as cURL or Postman, to send a POST request to the OAuth endpoint (
oauth_token.do).Format the request as a URL-encoded HTTP POST body and include the required parameters.
Record the access token and refresh token from the response.
Submit the access token with subsequent REST requests.
REST OAuth example
This example shows how to authenticate an inbound REST request using OAuth.
Parent Topic:REST APIs