I'm getting a
{"code": 401, "errno": 109, "error": "Unauthorized", "more_info": "http://autopush.readthedocs.io/en/latest/http.html#error-codes", "message": "Request did not validate missing authorization header"} error in my rails app. But it was working just fine until yesterday...
This is the code for the payload_send
Webpush.payload_send(
endpoint: s[:endpoint],
p256dh: s[:p256dh],
auth: s[:auth],
vapid: {
subject: vapid_keys[:subject],
public_key: vapid_keys[:public_key],
private_key: vapid_keys[:private_key]
}
)
And all the required parameters are definitely completely filled in.
I'm using this webpush library for rails https://github.com/zaru/webpush
Related
Following this guide: https://developer.twitter.com/en/docs/authentication/oauth-2-0/user-access-token. I am getting this error when making the POST oauth2/token at the step 3 request:
`
{
"errors": [
{
"code": 99,
"message": "Unable to verify your credentials",
"label": "authenticity_token_error"
}
]
}
`
This is my request: (Note that I hide the client_id and code). The code is the one I receive after the step 2, doing the GET oauth2/authorize callback. Header: Content-Type - application/x-www-form-urlencoded;charset=UTF-8
My Request
I found the issue, the problem was that in the Bot Application, editing the Auth settings of my twitter app, I had the option: Confidential client which needed a Basic Auth = authorization: Basic ${'username + password encoded here'}
I tried get access token from microsoft example from here https://insen.github.io/blog/2017/09/24/Azure-AAD-with-Office-365/ No matter which property I use, I always get the 400 "invalid_grant" error. Anyone can help?
POST: "https://login.microsoftonline.com/[tenantId]/oauth2/token"
Content Type: "application/x-www-form-urlencoded"
Data:
client_id: [clientId]
scope: https://graph.microsoft.com/calendars.read
code: M.R3_BAY.6c27a84e-f211-c632-9298-c97ba411256b
redirect_uri: http://localhost/myapp/
grant_type: authorization_code
client_secret: [clientSecret]
Response:
{
"error": "invalid_grant",
"error_description": "AADSTS9002313: Invalid request. Request is malformed or
invalid.",
"error_codes": [
9002313
],
"timestamp": "2021-08-10 12:35:00Z",
"trace_id": "50ba80c2-7920-48bd-aee0-cab1b5baf801",
"correlation_id": "44fcb62f-b5f0-41f4-b596-b4abf74c2c55",
"error_uri": "https://login.microsoftonline.com/error?code=9002313"
}
After performing all the steps mentioned in:
https://developers.google.com/identity/protocols/OAuth2ServiceAccount
and making the access token request using postman:
https://www.googleapis.com/oauth2/v4/token
I received the following error:
"error": "invalid_grant",
"error_description": "Invalid JWT Signature."
Also I tried Service account authorization without OAuth,
and received the error:
{"error": {
"errors": [
{
"domain": "global",
"reason": "authError",
"message": "Invalid Credentials",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Invalid Credentials"
}
}
What could be the issue and how do I solve it?
When trying to send a CURL request to:
https://preview.twilio.com/porting/PortOrders
I get the following response when using our Master account credentials:
{
"code": 20404,
"message": "The requested resource /porting/PortOrders was not found",
"more_info": "https://www.twilio.com/docs/errors/20404",
"status": 404
}
Has the porting API url changed and the docs haven't been updated?
I am getting two errors that I am aware of.
I am building a app that should allow me to post news and like.
It is a plugin built by appery.io
On the Facebook side I identified the url of the page that the user would be redirected after login, example below the two errors are also listed below.
http://appery.io/app/view/ee34c582-cba8-4ea0-9236-572de16b20e4/FacebookPublishing_AfterLogin.html
{
"error": {
"message": "Invalid verification code format.",
"type": "OAuthException",
"code": 100
}
}
{
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191
}
}