Registering achievements: Object Base Domain Not Allowed, even when domain IS allowed - facebook-opengraph

I have an Open Graph achievement at the following URL:
http://rinth.bucket1.s3.amazonaws.com/Achievements_LOCAL/Achievement1.html
When I attempt to register it, I get a response of: status code 400: OAuth "Facebook Platform" "invalid_request" "(#3502) Object at achievement URL is not of type game.achievement"
When I bring up the debug tool to have it validate the HTML:
http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Frinth.bucket1.s3.amazonaws.com%2FAchievements_LOCAL%2FAchievement1.html
I get the following errors:
Object Base Domain Not Allowed: Object at URL 'http://rinth.bucket1.s3.amazonaws.com/Achievements_LOCAL/Achievement1.html' of type 'game.achievement' is invalid because the domain 'rinth.bucket1.s3.amazonaws.com' is not allowed for the specified application id '217132388329112'.
Missing Required Property: The og:url property is required, but not present.
Missing Required Property: The og:type property is required, but not present.
Missing Required Property: The og:title property is required, but not present.
I verified that this domain IS allowed by our application. Just in case, I also tried the entire process using a different domain (which resulted in the exact same error).
The graph URL at the bottom of the debug tool prints the following:
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException"
}
}
Any ideas on what I'm doing wrong?

To fix this problem you have to add "rinth.bucket1.s3.amazonaws.com" to the list of app domains in your application settings.
This security measure is there so that you can only access achievements from domains and applications that you specify.

Related

How to get other member's profile details from linkedin api

I am trying to fetch users details from linkedIn api. After generating accesstoken I can get my details from linkedIn api but I want to get other members details. How to get this work? please help me.
I have tried the solutions according to the documentation.
As per the documentation we have to sent a get request to the GET https://api.linkedin.com/rest/people/(id:{person ID}) to Retrieve Other Member's Profile. When I am sending the get request it is showing me
data: {
code: 'VERSION_MISSING',
message: 'A version must be present. Please specify a version by adding the LinkedIn-Version header.'
}
this error. after searching the documentation I found that there is a note saying
in order to make the sample calls above succeed, you must include
X-RestLi-Protocol-Version:2.0.0 in your request header.
I have added that to and still getting the error.
I experienced the same issue. After some browsing this works for me:
Use https://api.linkedin.com/v2/me instead of https://api.linkedin.com/rest/me
You need to pass the version number like this: LinkedIn-Version: 202210. It worked for me without changing /rest to /v2. More info here: Introducing API Versioning and New Content APIs.
I had the same problem.
As the error says, I tried using LinkedIn-Version as the header key and got:
{
"code": "INVALID_VERSION",
"message": "API versions should have date format as YYYYMM or YYYYMM.RR where RR is the revision"
}
With the header value being: 2.0.0
So I tried sending as value: 202201.01 ==> YYYY=2022, MM=01, RR=01
YYYY: year
MM: month
RR: revision
Obtaining:
{
"code": "NONEXISTENT_VERSION",
"message": "Requested version 20220101 is not active"
}
Trying some different dates and revision codes, I got to value = 202204.01 that gave me:
{
"serviceErrorCode": 100,
"code": "ACCESS_DENIED",
"message": "Not enough permissions to access: me.GET.20220401"
}
I'm also facing the same issue but you can use this
https://api.linkedin.com/v2/me
and it will work
This version worked for me: 202204.01
Then I got:
"code": "EMPTY_ACCESS_TOKEN",
"message": "Empty oauth2 access token"
Which I think can be fixed by getting the access token by implementing the 3-legged OAuth. I have successfully implemented that for getting someone's profile but I am doing this for getting org info

Creating RPC through intergromat apps returns 404

I am trying to create an RPC that lists departments in a service. However, the endpoint for listing all departments returns an HTTP 404 error if no departments exist. It seems that the 'valid' directive does not work when the status code is greater than 399. Is there a workaround for this?
There is no way to mark a response status greater than 399 as OK. The valid directive serves for the other direction - marking a 200 status as an error. The only thing I can recommend is putting the following error handling code inside your RPC:
"error": {
"404": {
"type": "DataError",
"message": "No departments found. --ServiceName-- marks this case as an error - please switch to the Map mode to save."
}
}
That will at least help the user know what's going on when they try to set up the module input.
Here's what this would look like inside a Scenario.

CreateFileUploadSession() calls result in "Object reference not set to an instance of an object." response from Graph API

I have a website running in production that uploads files on behalf of users. This functionality has been working for months with only transient network issues.
Past two weekdays (Friday and Monday, virtually no usage over the weekend), all users are getting the standard null reference error whenever they try to upload the file. I'm able to produce this in all our environments. The interesting part is that the graph service itself is returning the error message, this is NOT a null reference exception from the website code.
Here is the request URL:
https://graph.microsoft.com:443/beta/groups/[id]/drive/items/[folderId]:/[filename].[ext]:/microsoft.graph.createUploadSession
The [] and content within are placeholders for the values that are sent. I am using the .NET Graph SDK and have verified that it is properly encoding the file name.
The body of the response from the Graph API is:
{
"error": {
"code": "InternalServerError",
"message": "Object reference not set to an instance of an object.",
"innerError": {
"request-id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"date": "2020-02-17T20:10:03"
}
}
}

Internal Server Error in OAuth for Google

EDIT: I was able to resolve the original error here when I realized my ROOT URL was set to my IP address rather than my domain. However, I now have a new issue. My client ID is the same as the original post below. This works fine in the local app, but in production, the popup flashes for a second and then the login box displays "Internal Server Error". I can't see any other messages that would explain it.
I am using the service-configuration package to load the settings, as follows:
ServiceConfiguration.configurations.upsert(
{ service: "google" },
{
$set: {
clientId: "************",
loginStyle: "popup",
secret: "***********"
}
}
);
If I add ?close to the end of my Authorized redirect URI, the Google popup comes up with a redirect_uri_mismatch error, showing the URI without ?close. I think there was an issue resolved here but it at least shows me that my project in Google is being recognized.
ORIGINAL POST
I am setting up an OAuth 2.0 client ID for accounts-google in Meteor and am seeing the following error:
400. That’s an error.
Error: invalid_request
Invalid parameter value for redirect_uri: Raw IP addresses not allowed:
http://***.***.***.***/_oauth/google
My Client ID in Google:
Authorized Javascript Origins
http://localhost:3000
http://myApp.com
Authorized redirect URIs
http://localhost:3000/_oauth/google
http://myApp.com/_oauth/google
I understand I must not be properly pointing the domain to the IP address. I have already set up an A record and the site works fine in other regards though, so not sure what step I missed.

How to stop consumers from hitting invalid resources in APIGee API

I have an Apigee proxy that has two resources (/resource1 and /resource2). If tried to access /resource3. How do I return a 404 error instead of the Apigee default fault?
Apigee displays the below fault string:
{
"fault": {
"faultstring": "The Service is temporarily unavailable",
"detail": {
"errorcode": "messaging.adaptors.http.flow.ServiceUnavailable"
}
}
}
Thanks
Currently the way flows work in apigee this way - It parses through your default.xml (in proxy) and tries to match your request with one of the flow either through the path-suffix like "/resource1, /resource2" or VERB or any other condition you might have. If it does not find any matching condition, it throws the error like above.
You can add a special flow which will be kicked in if the condition matches none of the valid flows you have. You can add a raisefault policy in that flow and add a custom error response through that flow.
A better solution is to:
be sure to define something in the base path of all Proxy APIs
create an additional Proxy API called "catchall" with a base path of "/" and with just a Raise fault throwing a 404
Apigee execute Proxy APIs from longest Base Path to shortest; the catchall will run last and always throw back a 404
I just want to clarify Vinit's answer. Vinit said:
If it does not find any matching condition, it throws the error like above.
Actually, if no matching flow condition is found, the request will still be sent through to the backend. The error you mentioned:
{
"fault": {
"faultstring": "The Service is temporarily unavailable",
"detail": {
"errorcode": "messaging.adaptors.http.flow.ServiceUnavailable"
}
}
}
was returned after attempting to connect to the backend without matching a flow.
Vinit's solution to raise a fault to create the 404 is the best solution for your requirements.
In some cases, however, it is appropriate to pass all traffic through to the backend (for example, if you don't need to modify each resource at the Apigee layer, and you don't want to have to update your Apigee proxy every time you add a new API resource). Not matching any flow condition would work fine for that use case.

Resources