Table of Contents
Authorization / Authentication
OAuth 2.0 Authentication settings are available at interworks.cloud BSS > Setup > Administration > System Options > API Credentials
In order to make calls to interworks.cloud BSS and Billing API you must be authorized and authenticated.
Management of OAuth 2.0 Keys and of the Application Users is available in the above section.
interworks.cloud BSS API uses the OAuth 2.0 Resource Owner Password Flow in order to properly authorize and authenticate each request.
The Resource Owner Password Flow
The Resource Owner Password Flow is used to authenticate the consumer supposing that already has the application user’s credentials.
In this flow, the application user’s credentials are used by the application to request an access token by calling Request Token URL end point.
Getting the Access Token
Once OAuth 2.0 Authentication is enabled for an organiztion, the system issues 'Client Key' and 'Client Secret'.
By creating an application user, a set of username / password credentials should also be available.
These values could be used to a HTTP POST request to "/oauth/token" endpoint in order to receive an access_token value.
According to OAuth 2.0 specification, the 'Client Key' and 'Client Secret' value can be sent as request parameters. However, interworks.cloud Plarform accept these values only through basic authentication.
The following example demostrates a call for getting an access token using C# code.
The request produced is provided below.
If all info is valid the response will contain the access token as provided below.
Making a call
In order to call API methods, the derived access_token should be added in the 'Authorization' header (as defined in the OAuth 2.0 protocol).
An example call can be made using the following example.
Sample Application for .NET Client
To get the code for the sample application, download Interworks.Cloud.BSS.API.Client.zip file.
The .zip file that you download contains a Visual Studio solution with a .NET Console Application that performs calls for receiving a access token and getting the synchronization options of an account.
Sample Application for JAVA Client
To get the code for the sample application, download bss.api.client.JAVA.zip file
The .zip file that you download contains a solution with a JAVA Application that performs calls for receiving a access token and getting the synchronization options of an account.
- No labels