DEV Community

Megha Ghotkar
Megha Ghotkar

Posted on

How to Create an Authorization Request Link for Acrobat Sign OAuth Integration.

What is OAuth?
OAuth is an open-standard authorization protocol that enables applications to access resources on behalf of users without sharing their passwords. It's commonly used for allowing third-party applications to access web services on behalf of a user.

Step 1: Obtain Your OAuth Credentials
Before you can create an authorization request link, you'll need to obtain your OAuth credentials from the Acrobat Sign OAuth configuration page. These credentials include your client ID, which identifies your application, and your redirect URI, where users will be sent after authorization.

Step 2: Construct the Authorization Request Link

  • Your app must include a link your customers use to initiate the OAuth request process. The OAuth process starts with the client directing the user’s browser request to the /public/oauth/v2 endpoint with the requisite query string parameters. You are simply invoking the Acrobat Sign APIs here. For example:
  • For partner apps the Base URI (Acrobat Sign endpoint) should NOT contain the “shard” of an account (i.e.: na1, na2, eu1, jp1, etc.)
  • For Customer apps the Base URI should contain the "shard" of an account
  • (The domain which we have selected while creating application)

Now that you have your OAuth credentials, it's time to construct the authorization request link. The link will direct users to the Acrobat Sign OAuth endpoint, initiating the authorization process. Here's an example of how to construct the link:

The pattern to create an authorization request link:
Base_URL?Redirect_URI&Response_Type&Client_Id&Scope

https://secure.echosign.com/public/oauth?
   redirect_uri=https://your-oAuthInteraction-Server/your-oAuth-Page.html&
   response_type=code&
   client_id=xxxxxxxxxx&
   state=xxxxxxxxxx&
 scope=user_read:account+user_write:account+user_login:account+agreement_read:account+agreement_write:account+agreement_send:account+widget_read:account+widget_write:account+library_read:account+library_write:account+workflow_read:account+workflow_write:account
Enter fullscreen mode Exit fullscreen mode

Let's break down the parameters:

response_type=code: This tells the process to look for the OAuth code on the redirect URI once the user logs in and accepts the authorization permissions.
client_id: Your application's unique identifier obtained from the Acrobat Sign OAuth configuration page.
redirect_uri: Your custom, secure, and absolute URI where users will be redirected after the authorization process.
scope: A space-delimited set of permissions specified during the OAuth configuration setup, indicating the permissions that the user will be asked to approve.
state: An optional parameter used to protect against CSRF. It returns to the client as a parameter at the end of the authorization process.

Step 3: Initiating the OAuth Request
With the authorization request link prepared, it's time to enter it into the browser's address bar and initiate the OAuth request. Upon navigating to this link, users will be directed to the Acrobat Sign sign-in page, where they'll be prompted to authenticate their credentials.

Step 4: Signing In and Granting Access
Once on the sign-in page, users should proceed to sign in with their respective Adobe credentials. After successful authentication, they'll encounter a confirmation screen detailing the requested permissions. Here, users should carefully review the permissions and proceed by selecting "Allow Access" to grant authorization.

Step 5: Receiving the Authorization Code
Post-authorization confirmation, the browser will automatically redirect to the specified redirect URI, appending the authorization code as a parameter in the URL. To retrieve this authorization code, users need to examine the URL parameters displayed in the browser's address bar.

Conclusion
In conclusion, by meticulously following these outlined steps, you can seamlessly create an authorization request link and generate an authorization code for Adobe Acrobat Sign OAuth integration. This process streamlines user authentication and access to Acrobat Sign APIs, empowering your application with enhanced functionality.

Top comments (0)