eg-01-java-jwt example returning empty body - docusignapi

I'm trying to use the example project, but I keep getting this message:
DocuSign Exception!
Reason: 0
Error Reponse: null
I have configured everything following the instructions in the repository page.
I have tried debugging the class responsible for the HTTP Post, but so far I got nothing.

Probably you need to grant consent for the integration key to impersonate the user.
See https://github.com/docusign/docusign-java-client/issues/111#issuecomment-513537950

Related

Send Direct Message using Twitter API does not work

I am trying to send Direct Message to a user who I follow and who follows me.
When I first tried to make a POSTMAN request as per the document here I was getting a HTTP 415 response, media type not supported. I looked up the Error code in their document and understood that this was happening because the callback_url needed to be whitelisted.
So I followed this guide to whitelist the callback_url and generate the access_request token , i.e oauth_token and oauth_secret here
So, was :
1. Get successfully oauth/request_token and got the Response: &oauth_callback_confirmed=true for the callback_url configured my app details. As far as I could tell, that's all I thought, I needed to do to whitelist the callback_url
2. Got oauth_verifier and final oauth_token and oauth_token_secret
But, after generating the outh_token and oauth_token_secret and using it to make the DM API call, Now I am getting
{
"errors": [
{
"code": 32,
"message": "Could not authenticate you."
}
] }
When I try to make a GET auth/authenticate call as documented here, I get a HTTP 403 with a message
Whoa there!
The request token for this page is invalid. It may have already been
used, or expired because it is too old. Please go back to the site or
application that sent you here and try again; it was probably just a
mistake.
I can see in the Documentation that https://api.twitter.com/1.1/direct_messages/events/new.json
Requires authentication? Yes (user context only)
I think I am missing something. Can anyone please help me point in the right direction as to what I need to be able to send DM to users successfully ?
I was also getting this error just now, I regenerated my API Key & Secret for the account and the Access Token & Secret for the application and then my POST request worked correctly.

How to remove security requirement on an apiconnect path?

By default apiconnect adds security to be required on all the paths. How can I allow a hit on a path without requiring authentication first?
I've tried unchecking the "Use API security definitions" in the Security section of on my User.count path, but when I use the browser on the URL https://localhost:4002/api/Users/count I get back
Error
401 Authorization Required
code: AUTHORIZATION_REQUIRED
Error: Authorization Required
at D:\PeteSoft\node\test3\node_modules\loopback\lib\application.js:433:21
at D:\PeteSoft\node\test3\node_modules\loopback\lib\model.js:359:7
at D:\PeteSoft\node\test3\node_modules\loopback\common\models\acl.js:536:16
at D:\PeteSoft\node\test3\node_modules\async\dist\async.js:3888:9
at D:\PeteSoft\node\test3\node_modules\async\dist\async.js:473:16
at iteratorCallback (D:\PeteSoft\node\test3\node_modules\async\dist\async.js:1064:13)
at D:\PeteSoft\node\test3\node_modules\async\dist\async.js:969:16
at D:\PeteSoft\node\test3\node_modules\async\dist\async.js:3885:13
at D:\PeteSoft\node\test3\node_modules\loopback\common\models\acl.js:518:17
at D:\PeteSoft\node\test3\node_modules\loopback\common\models\role.js:447:21
at process._tickCallback (internal/process/next_tick.js:61:11)
How can I get the count returned instead of the Authorization Required error?
If you are using the free version, you have to include the IBM client Id (and IBM client secret is optional)..
However, the Authorization error can be catched, so if you properly configure the catch to capture that error, you could work withouth the IBM Client id.. (it is a bad practice, but might solve your problem).
Catch Auth Error
If you want to work with out those keys, you have to buy the product, and in the Design Tab, it will allow you to remove it...

Chrome Extension identity: OAuth2 request failed: Service responded with error: 'bad request'

I followed https://developer.chrome.com/extensions/tut_oauth exactly step by step but I am stuck at
https://developer.chrome.com/extensions/tut_oauth#identity_permission
where after I execute my extension, instead of getting the token, I get the error:
Unchecked runtime.lastError while running identity.getAuthToken:
OAuth2 request failed: Service responded with error: 'bad request'
Please suggest what is the possible cause of this error.
tl;dr
Update the scopes to the following if its empty,
"oauth2": {
"client_id": "yourExtensionOAuthClientIDWillGoHere.apps.googleusercontent.com",
"scopes":["https://www.googleapis.com/auth/userinfo.email"]
}
People who were following the tutorial on OAuth2: Authenticate Users with Google
If you've landed into this problem, it is probably because it's 2020 and the documentation isn't updated.
The tutorial asks you to,
Include the "oauth2" field in the extension manifest. Place the generated OAuth client ID under "client_id". Include an empty string in "scopes" for now.
{
"name": "OAuth Tutorial FriendBlock",
...
"oauth2": {
"client_id": "yourExtensionOAuthClientIDWillGoHere.apps.googleusercontent.com",
"scopes":[""]
},
...
}
but never updates it before calling the identity API call to fetch the token.
Updating the scopes, with the following should fix the issue,
"scopes": ["https://www.googleapis.com/auth/userinfo.email"]
I think that's because the scope is empty. I was like you follow the article, but found the problem is from the scope area.
I changed the scope as suggested but the problem still persisted. Then I tried not only to reload the extension but also tried to update it and it worked in the end (errors next to Remove button went away and I am able to authenticate).
Honestly, I am not sure if it is the Update that did the magic or change the empty Scope that did the magic but here is an answer from a 2020 July user who got it working. :)
(PS, if you don't have that many Google friends, or your friends who don't bother to have image, likely your code will fail with data.photos[0].url in the next step, you just need to take care of that)

Admin SDK Auth error, wrong error code

I'm using the Admin SDK, Auth feature.
When calling admin.auth().verifyIdToken(token) and the token is expired I get the error
Firebase ID token has expired. Get a fresh token from your client app and try again. See https://firebase.google.com/docs/auth/admin/verify-id-tokens for details on how to retrieve an ID token.
With error code
auth/argument-error
First of all, should the error code not be "auth/user-token-expired"?
Second, the error code I received is not in the Admin Authentication API Errors
I have a hard time handling all firebase errors properly so I can reply with proper error messages to the consumers of my API.
Expired tokens and invalid signatures are reported with the AuthClientErrorCode.INVALID_ARGUMENT error code. It seems the value of this constant is defined as argument-error in source. This can be fixed in a future release (or alternatively update the documentation to reflect the correct value of the constant, and avoid a potentially breaking change).
There is no such error code as auth/user-token-expired in Admin SDK. Suggest you report a feature request in the Github repo if that is important to you.

google static maps 403 error

Failed to load resource: the server responded with a status of 403 (Forbidden)
In this subdomain-site, the static map will apear without key:
http://ag16.stewede.ch/thom.html
The same html code, but another domain:
http://praxisgemeinschaftamgleis.ch/thom.html
the map is broken and gives back the above mentioned error.
Why is that so?
Thanks, Stefan
PS: The first link works fine without a key. Now I've added one to the second link. But also with a key. It won't work! What's wrong here?
You need to use API keys.
In praxisgemeinschaftamgleis.ch the request for the map gets this error response from the API:
The Google Maps API server rejected your request. This service requires an API key.
This is new, since June 22, 2016.
See also How do I check if my domain is grandfathered?

Resources