We are migrating data from one server to server. The requests that come to older server is being redirected to the new Ip address using htaccess. The older domain is registered with facebook. In the new domain I am getting the facebook authentication error.
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191 }
is there any way to do using htaccess so that it will take the older registered domain name while accessing facebook api's?
Related
I'm creating a website builder that will initially host users sites at wildcard subdomains. I want them to be able to add their custom domain by editing records on their domain registrar (i.e. A Record pointing to my IP - similar to how Firebase hosting, Squarespace, etc). I have personal name servers, but I would prefer to NOT use name servers - that way clients can keep/manage their MX and other records on their registrar.
I'm using cPanel API 2 to add domains, but unless the external domain has my name servers set, cpanel gives this error:
{
"cpanelresult": {
"preevent": {
"reason": "Oops, looks like example.com pointed to remote nameservers.",
"result": 0
},
"module": "AddonDomain",
"func": "addaddondomain",
"data": {
"result": 0,
"reason": "Oops, looks like example.com pointed to remote nameservers."
},
"error": "Oops, looks like example.com pointed to remote nameservers.",
"apiversion": 2
}
}
In the cPanel UI this error is followed by domain validation options - but not in the API response above.
Is there a way to bypass domain validation via the cpanel API? OR is there a better alternative to do what I'm wanting?
Trying to authentcate with my API without the frontend of my environment so I can test my API end points with postman or some sort of client. I have a Baerer token I took from my frontend axios requests but apparently Laravel wont take it and just returns Route login not defined IE meaning its trying to redirect to the login so it can't auth.
So I tried generating a new one with Insomnia, similar to postman since postman gave me the Route not defined issue so I gave up wih it.
Going to: http://api-core.test/api/oauth/token
Passing:
client_id=2
client_secret=...
grant_type=client_credentials
username=...#example.com
password=...
scope=
And now its just spitting out
{
"error": "unsupported_grant_type",
"message": "The authorization grant type is not supported by the authorization server.",
"hint": "Check that all required parameters have been provided"
}
I know this question has been asked for several times here but none of the solution worked for me.
Following are the steps I followed to create a service account:
Logged in to Google Play Console account.
Then navigated to Settings > API Access from the left panel.
Scrolled down to Service Accounts section and clicked on Create Service Account.
Followed the instruction mentioned on dialog opened.
While creating service account on Google API Console selected Service account Permissions as Project > Owner
Created key and downloaded in json format.
Now came back to Google Play Console and clicked on Grant Access to grant permission as Administrator.
Now I am using this service account to validate In App Purchases on server but I am getting this error:
{
"errors": [
{
"domain": "androidpublisher",
"reason": "permissionDenied",
"message": "The current user has insufficient permissions to perform the requested operation."
}
],
"code": 401,
"message": "The current user has insufficient permissions to perform the requested operation."
}
}
I am using this php lib and service account method to verify purchases.
I'm using Laravel 5.5 with passports for API services. Its working fine after adding the "client credentials" route middleware in local.
'client_credentials' => \Laravel\Passport\Http\Middleware\CheckClientCredentials::class
**Local Setup: **
URL: http://localhost/server/public/index.php/api/v1/user/1
I got response as,
{
"status": 200,
"response_time": 0.050323009490967,
"body": {
"user": "admin",
"email": "admin#domain.com"
},
"message": "User found"
}
**AWS Setup: **
But, when I move to AWS server it won't authenticate.
URI: http://api_server.com/server/public/index.php/api/v1/user/1
I got error as,
{
"message": "Unauthenticated."
}
Both installations are same, and I can get access-token and reset-token by its endpoints.
But POST/GET/PUT/DELETE API calls are now allowed on AWS server.
Why it's not supporting on AWS?
Any other ways to solve this?
[Note: "web" group's "POST/GET/PUT/DELETE" routes are working fine.]
you can check for security groups .. where many traffic groups ports are by default blocked.
I'm using this method to Google Shorten a Long URL via PHP on server side.
But it return me this error :
"domain": "usageLimits", "reason": "ipRefererBlocked", "message": "The referrer null does not match does not match the referrer restrictions configured on your API key. Please use the API Console to update your key restrictions."
But I already set the Referrer to localhost & 127.0.0.1
I also enabled google shortener and check its quota
May I know what settings else I didn't configure or Google Shortener not working on http://localhost?