CreateOAuthState

Syntax

CreateOAuthStateResult CreateOAuthState(CreateOAuthStateArg tArg)

Parameters

tArg. Operation execution parameters.

Description

The CreateOAuthState operation gets the authorization service URL, by which access token will be returned.

Comments

To execute the operation, in the tArg.svcKey field specify authorization service key. The key can be obtained on executing the GetOAuthSettings operation.

The operation results in the authorization service URL that will be added with the code generated by BI server for integrity check.

Example

Below is the example of getting authorization service URL. The request contains authorization service key. The response contains the generated URL.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CreateOAuthState xmlns="http://www.fsight.ru/PP.SOM.Som">
<tArg xmlns="">
  <svcKey>0</svcKey>
  </tArg>
  </CreateOAuthState>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<CreateOAuthStateResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <authUrl xmlns="">https://accounts.google.com/o/oauth2/auth/authorize?client_id=214433571309-nl9btulcqc3u05d8128uaei3fjrdni8r.apps.googleusercontent.com&response_type=code&access_type=offline&scope=https%3A//www.googleapis.com/auth/userinfo.profile&response_mode=query&state=ED9F5DF6E55440CDA86561A87A71CD33&redirect_uri=</authUrl>
  </CreateOAuthStateResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CreateOAuthState" :
{
"tArg" :
{
"svcKey" : "0"
}
}
}

JSON response:

{
"CreateOAuthStateResult" :
{
"authUrl" : "https:\/\/accounts.google.com\/o\/oauth2\/auth\/authorize?client_id=214433571309-nl9btulcqc3u05d8128uaei3fjrdni8r.apps.googleusercontent.com&response_type=code&access_type=offline&scope=https%3A\/\/www.googleapis.com\/auth\/userinfo.profile&response_mode=query&state=ED9F5DF6E55440CDA86561A87A71CD33&redirect_uri="
}
}
public static CreateOAuthStateResult CreateOAuthState(uint key)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tCreate = new CreateOAuthState()
{
tArg = new CreateOAuthStateArg()
{
svcKey = key
}
};
// Get authorization service URL
var result = somClient.CreateOAuthState(tCreate);
return result;
}

See also:

Working with a Repository