bharathsfdc45@… | Posts: 1

REST API Authentication guide please

0 votes

I checked the guides and no matter what i do i am getting the error below on postman the url i used was https://sandbox.esignlive.com/oauth . I have created an app and have the client id and secret with me, i want to know which URL to hit and what parameters to send in order to get the access token

<html>

 

<head>

    <title>400 Bad Request</title>

</head>

 

<body>

    <center>

        <h1>400 Bad Request</h1>

    </center>

    <hr>

    <center>cloudflare</center>

</body>

 

</html>


Duo_Liang | Posts: 3776

Reply to: REST API Authentication guide please

0 votes

Hi there,

 

Thanks for your post!

If you want to use the client Id and secret pair to request a short-lived access token, using below API call:

HTTP Request

POST /apitoken/clientApp/accessToken

HTTP Headers

Accept: application/json

Content-Type: application/json

Request Payload

{ "clientId": "your_client_id", "secret": "your_client_secret", "type": "OWNER" }

The available options for the field “type” are “OWNER” and “SENDER”. If the latter, “email” field is required:

{ "clientId": " your_client_id ", "secret": " your_client_secret ", "type": "SENDER", "email": "sender_email" }

By specifying the type and the email, it determines who the authorized user is when the temporary access token is used later to make API requests.

Example Response

{ "accessToken": "17270a2f8960e84937478a60013404", "expiresAt": 1591029428203 }

 

Duo


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off