Get authorization link
Forms a link for authorization via the browser
Function GetAuthorizationLink(Parameters = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Parameters | --auth | Structure Of String | ✖ | Authorization data. See GetStandardParameters |
Returns: String - URL for browser transition
1C:Enterprise/OneScript code example
Parameters = GetTwitterAuthData();
Result = OPI_Twitter.GetAuthorizationLink(Parameters);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint twitter GetAuthorizationLink \
--auth "{'redirect_uri':'https://api.athenaeum.digital/opi/hs/twitter','client_id':'***','client_secret':'***','access_token':'***','refresh_token':'***','oauth_token':'***','oauth_token_secret':'***','oauth_consumer_key':'***','oauth_consumer_secret':'***'}"
:: JSON data can also be passed as a path to a .json file
oint twitter GetAuthorizationLink ^
--auth "{'redirect_uri':'https://api.athenaeum.digital/opi/hs/twitter','client_id':'***','client_secret':'***','access_token':'***','refresh_token':'***','oauth_token':'***','oauth_token_secret':'***','oauth_consumer_key':'***','oauth_consumer_secret':'***'}"
Result
"https://twitter.com/i/oauth2/authorize?response_type=code&client_id=ZG1vSmxlVTJXYi05M2c0ek9iV246MTpjaQ&redirect_uri=https://api.athenaeum.digital/opi/hs/twitter&scope=tweet.read%20tweet.write%20tweet.moderate.write%20users.read%20follows.read%20follows.write%20offline.access%20space.read%20mute.read%20mute.write%20like.read%20like.write%20list.read%20list.write%20block.read%20block.write%20bookmark.read%20bookmark.write&state=state&code_challenge=challenge&code_challenge_method=plain"