Child pages
  • WHM API 1 Functions - get_remote_access_hash
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 

Description

This function retrieves a hash from a remote access file.

Warning:

We deprecated this function in cPanel & WHM version version 64. We strongly suggest that you use the WHM API 1 api_token_list function.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_remote_access_hash?api.version=1&username=user&generate=1&password=12345luggage&host=hostname.example.com
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_remote_access_hash?api.version=1&username=user&generate=1&password=12345luggage&host=hostname.example.com
 Command Line
whmapi1 get_remote_access_hash username=user generate=1 password=12345luggage host=hostname.example.com


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "data": {
    "accesshash": "6b355856c00606648b803a7d896186632472d584eaf0dad878b8885e1f64edad24b31ff79f2
675303a598ac211ad5188c589fb60c5786a3e8d85c2029ca4ea76edb62becff7e3f7c5421f5
1bb4896737c22eda761e2a6fd96404bf513ee9051480ea86c800ab9b45f5255590836c7b76
9816a8f7f5def1e0c6cb19c212f01f56bb3392854ce51178a943eab6d1ce5d44857e980f7072
4f50964d2fbe01cb076a119dc5bf421051c2a0882550cdc69872832167c91e11bbe5c95d98
474096ebe14b6ca9da2d73faecea5ec37f208912f5da578d5f8ab7c257584002e1808614f98
59dceae564e8f30a9790c232d005ebd44f912e20b72e731fc600156e5b9f2902b0dd9130100
22e6b0deb6a2fb0d38ff3fd005c53f321ec812d3be10643dce81c46e1b9e2abe8814d46ba49
b8a173b3e01ec677ea182cabb55db6d9eab2240755be1bbb1d7094a155fd262934ec099fdb
a3b10f409dced62d3d570ab6478a269a95da1314a45a5916da07312bf7e5a53d57b090e9c2
4932776f7ffdcf90ba2fa5cd935995795348b67311185f54da6b90da8771585e78c5f587e427
bead9198faaa631b8216099c25373c8d4c26a011f295188963840777d09d95b6385df83370
98b7e231534323457b9388fe9ea8046"
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "get_remote_access_hash"
  }
}
 Output (XML)
<result>
    <data>
        <accesshash>
6b355856c00606648b803a7d896186632472d584eaf0dad878b8885e1f64edad24b31ff79f2
675303a598ac211ad5188c589fb60c5786a3e8d85c2029ca4ea76edb62becff7e3f7c5421f5
1bb4896737c22eda761e2a6fd96404bf513ee9051480ea86c800ab9b45f5255590836c7b76
9816a8f7f5def1e0c6cb19c212f01f56bb3392854ce51178a943eab6d1ce5d44857e980f7072
4f50964d2fbe01cb076a119dc5bf421051c2a0882550cdc69872832167c91e11bbe5c95d98
474096ebe14b6ca9da2d73faecea5ec37f208912f5da578d5f8ab7c257584002e1808614f98
59dceae564e8f30a9790c232d005ebd44f912e20b72e731fc600156e5b9f2902b0dd9130100
22e6b0deb6a2fb0d38ff3fd005c53f321ec812d3be10643dce81c46e1b9e2abe8814d46ba49
b8a173b3e01ec677ea182cabb55db6d9eab2240755be1bbb1d7094a155fd262934ec099fdb
a3b10f409dced62d3d570ab6478a269a95da1314a45a5916da07312bf7e5a53d57b090e9c2
4932776f7ffdcf90ba2fa5cd935995795348b67311185f54da6b90da8771585e78c5f587e427
bead9198faaa631b8216099c25373c8d4c26a011f295188963840777d09d95b6385df83370
98b7e231534323457b9388fe9ea8046
        </accesshash>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>get_remote_access_hash</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

ParameterTypeDescriptionPossible valuesExample
usernamestring

Required

The user's username.

A valid username.user
generateBoolean

Whether to generate a new hash for the user if one does not exist.

The value of this parameter defaults to 0.

  • 1 — Generate a new hash.
  • 0 — Do not generate a new hash.
1
passwordstring

Required

The user's password.

A secure password.

12345luggage
hoststring

Required

The server's hostname.

A valid hostname.hostname.example.com

Returns

ReturnTypeDescriptionPossible valuesExample
accesshashstring

The account's remote access hash.

A valid string.
 Click to view...

6b355856c00606648b803a7d896186632472d584eaf0dad878b8885e1f64edad24b31ff79f2

675303a598ac211ad5188c589fb60c5786a3e8d85c2029ca4ea76edb62becff7e3f7c5421f5
1bb4896737c22eda761e2a6fd96404bf513ee9051480ea86c800ab9b45f5255590836c7b76
9816a8f7f5def1e0c6cb19c212f01f56bb3392854ce51178a943eab6d1ce5d44857e980f7072
4f50964d2fbe01cb076a119dc5bf421051c2a0882550cdc69872832167c91e11bbe5c95d98
474096ebe14b6ca9da2d73faecea5ec37f208912f5da578d5f8ab7c257584002e1808614f98
59dceae564e8f30a9790c232d005ebd44f912e20b72e731fc600156e5b9f2902b0dd9130100
22e6b0deb6a2fb0d38ff3fd005c53f321ec812d3be10643dce81c46e1b9e2abe8814d46ba49
b8a173b3e01ec677ea182cabb55db6d9eab2240755be1bbb1d7094a155fd262934ec099fdb
a3b10f409dced62d3d570ab6478a269a95da1314a45a5916da07312bf7e5a53d57b090e9c2
4932776f7ffdcf90ba2fa5cd935995795348b67311185f54da6b90da8771585e78c5f587e427
bead9198faaa631b8216099c25373c8d4c26a011f295188963840777d09d95b6385df83370
98b7e231534323457b9388fe9ea8046
  • No labels