Authentication

Oracle Internet of Things (IoT) Cloud Service uses a Certificate Authority (CA) certificate, issued by Verisign, to enable clients to connect securely to Oracle IoT Cloud Service. Most REST requests made to Oracle IoT Cloud Service use HTTP basic authentication, but there are some that must use OAuth for authentication and include the bearer access token.

Note:

Ensure that you have the appropriate login credentials for creating, managing, and deleting Oracle IoT Cloud Service resources, as described in Understand Oracle IoT Cloud Service User Roles.

You can access almost all of the Oracle IoT Cloud service REST resources over HTTP. You must provide your user name and password for your Oracle IoT Cloud Service account to verify whether you have sufficient privileges for invoking the desired REST API.

For example, to authenticate using cURL:

  • Set the cURL environment variable, CURL_CA_BUNDLE, to the location of your local CA certificate bundle. For information about CA certificate verification using cURL, see: http://curl.haxx.se/docs/sslcerts.html.

  • Use the -u cURL option to pass the user name and password for your Oracle IoT Cloud Service account (for example, jane@example.com and password ) .

The following example cURL command gets the server information:
curl -u jane@mySmartHome.com:password
  -H "Content-Type: application/json"
  -H "Accept: application/json"
  -X GET  
  http://MyServiceName-MyIdentityName.iot.MyServiceDataCenter.oraclecloud.com/iot/api/v1/private/server

The use of an OAuth2 access token is also a supported authorization option and is required for certain resources, such as Messages REST API. The token must first be obtained by authenticating with the OAuth2 server included with Oracle IoT Cloud Service. See the Authentication REST API for more information.