I have used oauth2 authentication for gmail to send mails using nodemailer. Application was working fine past few months but there is an error coming now. I am getting error:
{
Error: invalid_grant,
Message: 'Bad Request'
}
I had resolved this issue by updating refresh token but this error is occurring again.
Related
I have an error on KNIME. I am trying to scrape the tweets from twitter but I have this error:
<< ERROR Twitter Search 0:2 Execute failed: 400:The
request was invalid. An accompanying error message will explain why.
This is the status code will be returned during version 1.0 rate
limiting (https://dev.twitter.com/pages/rate-limiting). In API v1.1, a
request without authentication is considered invalid and you will get
this response. message - Bad Authentication data. code - 215>>
This errors is due to you are issuing your request without authentication, first you need to authenticate against twitter and after you're be able to issue the request properly.
I keep on getting an "invalid grant" error, yet for what I can tell I am doing it all as per spec. I can get the tokens just fine:
aws cognito-idp initiate-auth --auth-flow USER_PASSWORD_AUTH --auth-parameters USERNAME=admin,PASSWORD=adminadmin,SECRET_HASH=Ol... --client-id 2pg...
That command gets me this:
Yet when I actually try to use the refresh token, I keep on getting:
An error occurred (NotAuthorizedException) when calling the InitiateAuth operation: Invalid Refresh Token.
App client seem to be configured properly. I don't have device tracking setup and the app config seems to allow refresh tokens too:
Similar error when invoking oauth2/token endpoint via Insomina:
Where did I go wrong? Any help is greatly appreciated.
Turned out this behaviour was due to the device tracking being turned on. Not sure it's a bug or a feature, but after turning it off refresh tokens started to work like charm:
I previously had a Skype bot able to post messages using the API.
But on 11/17/17 I started getting this error on every attempt, and as a result, no message gets posted. I haven't changed anything.
requests.exceptions.HTTPError: 401 Client Error: The provided 'OAuth' ticket failed authentication. for url: https://apis.skype.com/v2/conversations/[conversation]/activities/
The process I use is to get an access token witha post to https://login.microsoftonline.com/common/oauth2/v2.0/token
and then to use that token to post a message to https://apis.skype.com/v2/conversations/[conversation]/activities/
It's able to get the token fine, but then when the message post is called, it raises the above exception.
I've faced with exactly the same problem and this worked for me:
I left all send messages endpoint as is for v2, BUT in token generation POST payload I've changed 'scope' -> 'https://api.botframework.com/.default'
Working on my Google Glassware and everything seemed to be going fine. I tried loading it up the other day after a while of not working on it and had an OAuth error. I tried refreshing the key and even starting a new project. The Error I got has atleast changed I am now getting -
An error occurred: Error refreshing the OAuth2 token, message: '{ "error" : "unauthorized_client" }'
The code is pretty much completely based off of the PHP Quick Start. This happens when I try and authorize the app with my account. I know my information is correct for the config.php file. Any suggestions?
I think in this case , it is possible that Authorization server has not allowed to access Authorization grant type
{error: 'unauthorized client'} may be related to Authorization server settings
Grant_types it has allowed.
Reference: http://tools.ietf.org/id/draft-ietf-oauth-v2-12.html#token-errors
I am integrating api in my application. when I am trying to tweet I am getting an error request 401, it seems to "Authentication credentials were missing or incorrect". How will I remove this error ?
Thanks