I want to update data in Kinvey Database. I used Rest API (PUT Method). but it is not working .
Same Authorization token in GET and POST method is working fine. Here is the Error :
{ "error": "InsufficientCredentials", "description": "The
credentials used to authenticate this request are not authorized to
run this operation. Please retry your request with appropriate
credentials", "debug": "" }
Please correct me.
I finally found the solution after wasting my two days.
Kinvey applys permission on collection level. So you have to change that permission.
Here is the reference link.
http://devcenter.kinvey.com/rest/guides/security#collectionpermissions
Please see the snap, so you can better understand.
Related
i try to test oauth on passport using laravel 8 but it gave me this error:
{
"error": "invalid_client",
"error_description": "Client authentication failed",
"message": "Client authentication failed"
}
this is screen shot of passport
So, if you are working with Passport, make sure you have followed the steps mentioned in the documentation. Looks like you have missed the publishing of the keys from passport config php artisan vendor:publish --tag=passport-config. Once again if it is a fresh installation, you just need to follow the steps mentioned in the documentation to setup Passport and it works like a charm!
I was also facing the same error in one of my project on which I was working on, and just by googling I came to this post. I also tried the proposed answer but it wasn't work for me so I gone through with given parameters. My use case was a bit different in which I was on password authorized screen and facing the same error as you have. I was just passing the data in query string. So I just matched my query string data with the one I have in the database and my issue is resolved now. Try this in your case as well and hoping your issue will also fixed. This error is less or more depending upon the posted data.
I have a laravel project in which I use google drive API. It was working fine but then I got the error:
"domain": "usageLimits", "reason": "dailyLimitExceededUnreg", "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
so I again get the refresh token from oauth playground now it is working fine.
but I don't want to again and again get the refresh token manually and update in my .env file.
how can I automatically update the refresh token whenever it is expired.
the information of the client id, secret key and refresh token is saved in .env file.
the google drive file upload code is in route in web.php
Storage::disk("google")->putFileAs("",$request->file("thing"),$name);
$url=Storage::disk('google')->url($name);
$details=Storage::disk("google")->getMetadata($name);
$path=$details['path'];
I understand that you already have a PHP framework that works with the Drive API. Based on that, the error informs you that the OAuth 2.0 flow is not correctly configured. Please check the Drive API PHP example to see a fully functional OAuth 2.0 authorization script. You can copy-paste that example to a run test, and once it's working you can just update your script to include the necessary authentication flow. Please ask me any doubts about this approach.
I have GSuite Service Account and My app uses following scopes (these are working fine) :
https://www.googleapis.com/auth/admin.directory.customer.readonly,https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.domain.readonly,https://www.googleapis.com/auth/drive.readonly,https://www.googleapis.com/auth/drive.metadata.readonly,https://www.googleapis.com/auth/drive.photos.readonly
Now I Have to access gsuite groups, As mentioned here in api documentation : https://developers.google.com/admin-sdk/directory/v1/reference/groups/list
I Added these two scopes :
https://www.googleapis.com/auth/admin.directory.group.readonly,
https://www.googleapis.com/auth/admin.directory.group
in my already existing scopes, and I'm unable to authorise my application now.
When I try to check this via api explorer in the above link, It throws an error : 400 - Bad Request. But the strangest thing happen, it returned 200 ONCE only while trying and returned the group I created, But I'm unable to make successful call again and keeps getting error.
Is there anything I'm missing here? Any help will be really appreciated.
Thanks.
NOTE: I can access gsuite users with above scopes as well, the issue is only with the groups.
As is mentioned on the documentation, 400 error is not related to the scopes that you are using. However the explorer API information is not correct as the "Customer" field is required, You can try it typing my_customer on that field and you should get a 200 if your user has the proper permissions.
I have submitted a request to update the current documentation.
I'm having the same issue as the one posted here.
Unfortunately, that project was put on hold and the question was never answered. Does anyone know why an authenticated call to https://partners.googleapis.com/v2/companies?key=API_KEY returns the following?
{
"error": {
"code": 403,
"message": "The caller does not have permission",
"status": "PERMISSION_DENIED"
}
}
Any help is appreciated.
Depending on what kind of data you are querying for, it may be necessary to use OAuth 2.0 instead of just an API key. If the data you are querying is entirely public, though, you may be ok with just your API key.
Either way, https://developers.google.com/partners/v2/how-tos/authorizing appears to explain what is necessary to set up auth for this method correctly.
https://xxxx.service-now.com/api/now/v1/table/incident while we're consuming this API in postman we're getting
{
"error": {
"message": "User Not Authenticated",
"detail": "Required to provide Auth information"
},
"status": "failure"
}
Here we are given basic authentication and the JSON input like
{
"short_description":"Creating incident through Request",
"assignment_group":"287ebd7da9fe198100f92cc8d1d2154e",
"urgency":"3",
"impact":"3"
}
It basically says you are not authenticated, it either means you didnt provide correct credentials or you forgot to provide basic-auth header while querying through postman
I think the error message is pretty clear about what the problem is... you're not authenticated. You'll need to authenticate in order to utilize the API. Unless you have a complex authentication scheme going, you can probably use Basic Authentication in PostMan and use the credentials for an account which you know has access to the resource you're trying to access.