Authentication
All API requests must be authenticated. First, call the login endpoint to receive an access token. Then send that token in the Authorization header of every subsequent request.
You can authenticate in one of two ways:
Client ID + Client Secret
Integrations, servers and automated systems
Email + Password
Testing and manual use
This page focuses on the Client ID + Client Secret flow.
Step 1: Get your Client ID and Client Secret
Log in to the 2Sign system.
Go to Settings > API.
Copy the Client ID.
Click Generate next to Client Secret.
Copy the Client Secret and store it securely, then click Save.
The Client Secret is a GUID in this format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxNo additional activation is required on the account.
Step 2: Request an access token
Send a POST request to /api/Account/LoginApi.
Option A: Client ID and Client Secret
GrantType
Must be "client"
ClientId
The Client ID from Settings > API
ClientSecret
The Client Secret you generated in Settings > API
Option B: Email and password
Example request
Example response
Step 3: Use the access token
Extract the value of the access_token field and send it in the Authorization header of every request:
Security best practices
Treat the Client Secret like a password.
Store it in a secure place (environment variable or secrets manager).
Never expose it in public repositories, client-side code, or logs.
Never send it in support emails, tickets or screenshots. Always mask it.
Troubleshooting
400 Bad Request
Make sure the body is valid JSON (no trailing commas) and that GrantType is "client".
Authentication fails with a valid-looking secret
The Client Secret may have been copied after saving. Generate a new one and copy it before clicking Save.
Lost the Client Secret
It cannot be retrieved. Generate a new one in Settings > API.
Unsure which value goes where
ClientId ← Client ID, ClientSecret ← Client Secret, both from Settings > API.
Error: token wasnt created
Check the following:
The Client Secret was generated successfully in API Settings.
You copied the value before clicking Save (a Client Secret copied after saving will not work).
The Client ID and Client Secret belong to the same account/pair.
You are sending the request to
POST /api/Account/LoginApi.You are using the Client Secret and not the API Key.
The body does not contain extra fields such as
Url,GuidorCode.
If the error persists, contact 2Sign support and include:
The endpoint and HTTP method
The request body (with the Client Secret masked)
The full error response
Any request / correlation ID, if available
client@example.comsample_passwordtruesample_granttypeid_3241c482sample_clientsecretsample_codesample_phonenumbersample_urlid_2019b9801trueclient@example.comid_07cc8271Success (Custom Example)
{ "Status":"success", "Message":"", "ResponseObject":{ "Email":"apisimulator@2sign.co.il", "Password":null, "HasRegistered":null, "LoginProvider":null, "UserName":"apisimulator@2sign.co.il", "access_token":"Ky0L1ABLsZv8JuZEUCND9qOC7qtAmX5BQPp1t2ljTuES5-O5FjZoSSxkzmGAXa7hdFbhwOv4tRDdEBuKQ2lWAoOjhAfYmmy1w_HoL3QSlTYCjq01zembSNdEUexnjYwLHfZXCagEXIGP85_QoGOwyTRrexXOS8MBU5kSFWZdrQF5512b721weX2BU55EEaIp46f5W4U1ucA-7ogVYKt9En9W5iMVWcSr3JxF46G2BYtPW8AjflUgxuO2k5PBpjBuIa0vnkptCkyKVfcm1Xh3usr-q8RhKUUo3db4x1bQQjeE9OSLK9DQ-p715fcWbFjakGFqdrhYVhHHpJWp45dadTcg5EYDH-XL96VdO203UCyCC0w3MvJzF3YMZ3cx5J4qpZ1ogm3KRvj85l4C563iEkOBRZgvFRozZwuyGK-fpZk4z0Lt-4LlReENW9qCLnYOUC-EAEy_zANW3Rzc71QTF--Twisv0fJme_1sQOiKChKjr9Vv5j-7B5-og", "Address":null, "LanguageId":null, "CompanyName":null } }Bad Request
Internal Server Error
POST /api/Account/LoginApi HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 389
{
"Email": "client@example.com",
"Password": "sample_password",
"RememberMe": true,
"GrantType": "sample_granttype",
"ClientId": "id_3241c482",
"ClientSecret": "sample_clientsecret",
"Code": "sample_code",
"PhoneNumber": "sample_phonenumber",
"Url": "sample_url",
"Guid": "id_2019b980",
"OTPResendAttempts": 1,
"Is2faMode": true,
"Authenticators": null,
"Emailmp": "client@example.com",
"UserIdOuterEnc": "id_07cc8271"
}{
"Status":"success",
"Message":"",
"ResponseObject":{
"Email":"apisimulator@2sign.co.il",
"Password":null,
"HasRegistered":null,
"LoginProvider":null,
"UserName":"apisimulator@2sign.co.il",
"access_token":"Ky0L1ABLsZv8JuZEUCND9qOC7qtAmX5BQPp1t2ljTuES5-O5FjZoSSxkzmGAXa7hdFbhwOv4tRDdEBuKQ2lWAoOjhAfYmmy1w_HoL3QSlTYCjq01zembSNdEUexnjYwLHfZXCagEXIGP85_QoGOwyTRrexXOS8MBU5kSFWZdrQF5512b721weX2BU55EEaIp46f5W4U1ucA-7ogVYKt9En9W5iMVWcSr3JxF46G2BYtPW8AjflUgxuO2k5PBpjBuIa0vnkptCkyKVfcm1Xh3usr-q8RhKUUo3db4x1bQQjeE9OSLK9DQ-p715fcWbFjakGFqdrhYVhHHpJWp45dadTcg5EYDH-XL96VdO203UCyCC0w3MvJzF3YMZ3cx5J4qpZ1ogm3KRvj85l4C563iEkOBRZgvFRozZwuyGK-fpZk4z0Lt-4LlReENW9qCLnYOUC-EAEy_zANW3Rzc71QTF--Twisv0fJme_1sQOiKChKjr9Vv5j-7B5-og",
"Address":null,
"LanguageId":null,
"CompanyName":null
}
}Last updated