skip to main content
Hybrid Data Pipeline API reference : Management API : OAuth API for Google Analytics connectivity : OAuth profiles API : Update an OAuth profile
  

Try Now
Update an OAuth profile

Purpose

Updates an OAuth profile. Users can only edit OAuth profiles they own or have created.
Note: An administrator can execute this operation on behalf of a user by appending the user query parameter to the request and specifying a user name. See also Managing resources on behalf of users.

URL

https://<myserver>:<port>/api/mgmt/oauthprofiles/{id}

Method

PUT

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.
The URL parameter {id} is required.
Parameter
Description
Valid Values
{id}
The ID of the OAuth profile.
The automatically generated OAuth profile ID.

Request Payload Definition

The response takes the following format.

{
"name": "oauth_profile_name",
"oauthAppId": oauth_application_id,
"description": "oauth_profile_description",
"accessToken": "access_token",
"refreshToken": "refresh_token"
}
Parameter
Description
Usage
Valid Values
"name"
The name of the OAuth profile.
Required
The name can contain only alphanumeric characters and the underscore character.
"oauthAppId"
The ID of the OAuth application object.
Required
The automatically generated OAuth application ID.
"description"
A description of the OAuth profile.
Optional
A description provided by the user.
"accessToken"
The access token includes the credential information required to gain access to the Google Analytics API.
Optional
A valid access token.
"refreshToken"
The refresh token is used to generate new access tokens.
Required
A valid refresh token.

Sample Request Payload

{
"name": "Google_User_1",
"oauthAppId": 17,
"description": "OAuth profile 1",
"accessToken": "111c334445e55",
"refreshToken": "222d88899966fa"
}

Sample Server Response


Status code: 200
Successful response
{
"id": 33,
"name": "Google_User_1",
"oauthAppId": 17,
"description": "OAuth profile 1",
"accessToken": "111c334445e55",
"refreshToken": "222d88899966fa"
}

Authentication

Basic Authentication using Login ID and Password.

Authorization

The user must have the MgmtAPI (11) and ModifyDataSource (3) permissions.