skip to main content
Hybrid Data Pipeline API reference : Management API : OAuth API for configuring Hybrid Data Pipeline to authorize client applications : Generate access token and refresh token
  

Try Now
Generate access token and refresh token

Purpose

Generates access token and refresh token, using either of the two grant types- password grant type or refresh_token grant type.

URL

https://<myserver>:<port>/oauth2/token

Method

POST

URL Parameters

<myserver> is the hostname or IP address of the machine hosting the Hybrid Data Pipeline server for a standalone installation, or the machine hosting the load balancer for a load balancer installation. For a standalone installation, <port> is the port number specified as the Server Access Port during installation. For a load balancer installation, <port> must be either 80 for http or 443 for https. Whenever port 80 or 443 are used, it is not necessary to include the port number in the URL.

Payload Parameters

When the grant type is refresh_token, the following payload parameters are required:
Property
Description
Valid Values
"grant_type"
The grant type used for OAuth flow
This can be either password or refresh_token. In this case, it is refresh_token.
"refresh_token"
The refresh token that had been issued to the application.
A valid refresh token issued by Hybrid Data Pipeline.
"clientId"
The client ID is generated when the client application is registered. This ID is required when client applications initiate OAuth authorization.
An auto-generated value used when client applications initiate OAuth authorization.
"clientSecret"
The client secret is generated when the client application is registered. This secret is required when client applications initiate OAuth authorization.
An auto-generated value used when client applications initiate OAuth authorization.
When the grant type is password, the following payload parameters are required:
Property
Description
Valid Values
"grant_type"
The grant type used for OAuth flow
This can be either password or refresh_token. In this case, it is password.
"scope"
An OAuth 2.0 scope specifies the resources that can be accessed by client applications.
Currently, the only supported scope is api.access.odata.
"clientId"
The client ID is generated when the client application is registered. This ID is required when client applications initiate OAuth authorization.
An auto-generated value used when client applications initiate OAuth authorization.
"clientSecret"
The client secret is generated when the client application is registered. This secret is required when client applications initiate OAuth authorization.
An auto-generated value used when client applications initiate OAuth authorization.
"username"
User credentials
String
"password"
User Credentials
String

Sample Server Success Response


Status code: 200
Successful response
{
"access_token": "string",
"refresh_token": "string",
"expires_in": "string"
}

Sample Server Failure Response

{
"error":{
"code":222206628,
"message":{
"lang":"en-US",
"value":"Problem creating OAuth Client Application at this time. Please try again at another time."
}
}
}

Authentication

Basic Authentication using Login ID and Password

Authorization

Any active Hybrid Data Pipeline user