How to use DocuSign API with React.js? - reactjs

I need to do a POC of some DocuSign e-Signature features in a React.js environment. For starters, I would like to play with the examples as mentioned here https://github.com/docusign/code-examples-node/tree/master/lib/eSignature. The official documentation is not self explanatory on how to use these in a React.js code repo(exported from create-react-app). Neither could I find some relevant samples for a reference. Would appreciate if anyone can guide me on how can I port the examples in this repo https://github.com/docusign/code-examples-node in a React.js environment.

For React.JS:
You can make a direct API call from your React app. In this case you will not use the node.js SDK (it only works with Node.js). The API call is the create envelope call documented here: https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create/
You can see an example of the API call here: https://github.com/docusign/code-examples-bash/blob/master/examples/eSignature/eg017SetTemplateTabValues.sh#L68
You will also need to implement a private CORS gateway. We have an article on doing so plus code examples: https://www.docusign.com/blog/dsdev-building-single-page-applications-with-docusign-and-cors-part-2
2. Alternative is for your React app to ask your server app to call DocuSign. Your server app could use the Node.js SDK.

Related

How to implement mailing server with Next.js?

I am pretty new to Next.js and I want to implement a mailing feature for a contact form which I have on the site. Since Next.js is SSR, if we need to use a mailer I wonder: do we still need to have a separate backend environment where we then need to install the mailer (for example Node.js and Nodemailer) or we can install the mailer (for example Nodemailer) directly into the Next.js setup?
I know there is an option for having separate Node.js server, proving an API endpoint and using this endpoint for triggering the method where we will send emails (and probably send all the values from the contact form as a parameters in the endpoint), but I wonder if the Next.js allows direct implementation of a mailer nested directly into it's setup.
Next.js allows for creating custom API routes right within the project.
Here are the Docs:
https://nextjs.org/docs/api-routes/introduction
You need to create files in pages/api and the endpoint will be mapped to /api/*

oAuth 2 implementation in react js

I need a little guidance. I am trying to implement oAuth2 authentication in my React JS application. Backend is in service now. In react on login button click, service now popup will open to authenticate user and will provide access token at redirect uri.
I am having client id, client secret, access token uri, authorization uri, redirect uri.
But couldn't find any specific library for react js that gives oauth2 implementation. Please give me pointers so I can use any existing/implement oauth2 authentication for my Login page(using react).
I was trying to use ClientOAuth2, but I am not sure if this is correct to use with react js. Also, I am getting CORS error on using this library on my localhost.
Please share how to implement it properly.
I have a couple of tutorials you may find useful, which use the oidc-client library.
The design patterns used are technology neutral and can be implemented in any JavaScript tech stack.
TUTORIAL 1 : PLAIN TYPESCRIPT
This focuses on the basics of Authorization Code Flow (PKCE) and a productive developer setup:
Blog post
Code Sample
FINAL TUTORIAL: REACTJS
This focuses on some more advanced aspects, and includes an update to ReactJS:
Blog post
Code sample
I have used react-oauth2-auth-code-flow nom package to implement AUth2 flow in my react js application. The napm package has samples to help your implementation. Check this https://www.npmjs.com/package/react-oauth2-auth-code-flow

Jira REST APIs integration in reactjs application using "oath" authentication

How to integrate jira's REST APIs in reactjs application using "oath" authentication.
For a better understanding, you can start with this documentation. For sample code, this repo might be able to help you out; although there's no React specific sample, you can easily learn from the existing ones there (like Node.js) and apply it to your design as necessary.

Google App Engine Python Authenticated Endpoints and Android

I'm not able to find a small example (or tutorial) of Android App (possibly with Android Studio) that use Authenticated Endpoints realized with GAE (possibly Python).
Google examples (Greetings and Tic Tac Toe) seems have some problem in my environment (token error, 404 not found, .....).
Can anyone help me? I'm going crazy...
Thank you in advance.
Are you able to access your Endpoint from api Explorer on localhost(http://localhost:8080/_ah/api/explorer ) you can even simulate authentication there.
if API explorer is working then you need to check how you define SCOPE when getting credentials.
In my experience I had problems in following areas:
1. Generating Client IDs
2. define scoping in Endpoint API
3. Specifying correct scope in android App (server:client_id:123456789-abcdefghsadffwe.apps.googleusercontent.com";
I'm finally able to do it.
I used this 2 google examples:
On the server side:
https://github.com/GoogleCloudPlatform/appengine-endpoints-helloendpoints-python
On the client side:
https://github.com/GoogleCloudPlatform/appengine-endpoints-helloendpoints-android
The instructions inside this pages are, in my opinion, better than the official google documentation.

Google Calendar Api Documentation better than the official V3

Please I want to create Event in Google Calendar API but the documentation official is BAD I cant use it .. And someone here who can help me please!! Sorry with my english but I speak spanish!
I agree...
This helps a bit: Google Calendar Events
Depending on the process you are using, there are few examples for using asp.net and the service account option. I successfully created events via service account with granting domain-wide access. With this you just need to create an app, then service account for the app and follow the domain wide delegation steps on the google documentation pages. This option is great if you have an app that needs to create events without having to authenticate the user.
For working code and more info you can see what I used at-
Google API Calender v3 Event Insert via Service Account using Asp.Net MVC
What is "bad" about the documentation? (Don't just complain; provide actionable feedback.) In the v3 docs, check out the reference section on creating events. There is even sample code in Java, Python, PHP, and Ruby to help get you started just below the reference. In addition, below the sample code is the APIs Explorer where you can issue requests with appropriate payload to the API and see the HTTP response to ensure you're calling the API correctly and receiving the data you requested. If there's any additional way for us to improve the docs, please let us know!
UPDATE (Sep 2015): I created a blogpost and video that walks through some pseudocode (well, it's Python) for creating events. There are examples in most other languages too.

Resources