Java integration with Docu Sign - java

I am trying to integrate docusign with java application.
I am following Github example which is working.
https://github.com/docusign/docusign-java-client
Here I am just changing Integrator key,clientId and private key but is not working.
https://github.com/docusign/docusign-java-client/blob/master/src/test/java/SdkUnitTests.java
Here I have attached how I am copying key and id etc...
https://gitlab.com/sanju24689/docusign
Here I have also attached my code also.
It's giving me error like
"com.docusign.esign.client.ApiException: Error while requesting an
access token: POST https://account-d.docusign.com/oauth/token returned
a response status of 400 Bad Request"
See the stack trace

Please try starting with the Java webapp that is ready to go--it is a complete project.
See eg-03-java-auth-code-grant

Related

I am getting 502 Bad gateway error while creating team using Microsoft Graph Api and even using PowerShell commands

I am getting 502 Bad gateway error while creating team using Microsoft Graph Api and even using PowerShell commands. What am I doing wrong?
1.First attempt from Postman using Microsoft graph api:
Attached is the screenshot of Postman console while I am trying to create a new team:
I had searched online but I haven't got any solution so I tried doing the same thing from PowerShell using Microsoft Teams PowerShell cmdlets but I am still getting the same error .
Here I am using the access token i got from application permissions and I also assigned the app "Helpdesk administrator" role
2.Second attempt with Powershell cmdlets:-
Here is the screenshot of output in PowerShell
I had logged in to Microsoft Teams as a global administrator.
How can I fix this?
Is there a reason you are using the Microsoft beta api instead of the v.1.0?
The fact that you are using two different methods and getting a back-end error suggests either it is a problem with the beta api or possibly some error related to your account.
According to the documentation here https://learn.microsoft.com/en-us/graph/api/team-post?view=graph-rest-beta
When creating a new team based on an existing group, the body should be in this format:
POST https://graph.microsoft.com/beta/teams
Content-Type: application/json
{
"template#odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
"group#odata.bind": "https://graph.microsoft.com/v1.0/groups('groupId')"
}
Your Postman screenshot has the "group#odata.bind" value as a slightly different format. Try using the one above, and replace groupId with your actual group id.
Good luck.

Getting Error when try to get Pinterest Access Token

My question is similar to this one.
I have followed every step trying to get a Pinterest access token.
https://developers.pinterest.com/docs/api/overview/
I '
1. Created an app in the Pinterest developer dashboard
2. Got my authorization code without any problems
3. Tried to query my access token like in the docs:
POST https://api.pinterest.com/v1/oauth/token?grant_type=authorization_code&client_id=888888888888888&client_secret=9999999999999999999999&code=00000000000000
I tried to get it using curl command also.
Using Postman to get an access token is possible(Configure the OAuth flow:).
But from java or postman i pull above endpoint then getting this error {"error": "invalid_grant"}
Can anybody help me and tell me what could go wrong and how to fix it?
Thank you!

Browser doesn't show any XML tag tree

I am calling a REST based service and the URL that I am calling doesn't show any XML tags but by pressing F12 (developer mode) I found out that the response code is 200 meaning it is successful.
I am kind of lost here. What I am suppose to do at the back end because I also get premature end of file exception. If I am getting a 200 response code then why it is throwing premature end of file exception?
Thanks...
So this is for the starters. While calling a third party service we need to make sure that we are providing the authentication credentials as part of the request header. In my case I wasn't supplying them but the strange thing was that I was getting a OK response but down the line it was throwing premature end of file exception.
So once I provided the credentials for the service it went through and now I can see the beautiful XML payload.
Happy coding...

Java Azure AD OpenId connect gives 302 redirect code

I am new to Azure web application development.
I am trying to do AD authentication with Java + Tomcat + Spring application according to the Azure documentation.The same code is working fine with my first project.
Now I am trying to follow the same step to create second application.But after login its not going to next page of application.Even though the user information is coming null.And the final URL code is coming 302 code.
Can anyone please help me on this.
You can use fiddler for debugging. Also take a look at the Java sample here https://github.com/Azure-Samples/active-directory-java-webapp-openidconnect.git

Google Adwords reports error

We are using Google ad-libs v201506 jar. While downloading google adwords reports, intermittently we get the error
org.xml.sax.SAXParseException: Open quote is expected for attribute "lang" associated with an element type "html".
I see that response code is 502 ( bad gateway ) and it appears that the parser is trying to parse the error message from the HTTP response and fails.
Has anyone using the this library seen this error or know a way to fix this?
An "AdWords API Forum" thread from 2013 indicates that one person solved a similar issue by changing from the AdWords sandbox environment to production.

Categories