Dropbox php sdk library errors - api

I am trying to set dropbox api up on this website http://wedapp.users34.interdns.co.uk/
I am using this library http://code.google.com/p/dropbox-php/
I am getting lots of issues i have contacted my host and they have confirmed that i have The OAuth extension installed.
Just keep getting lots of errors like below.
Fatal error: Uncaught exception 'OAuthException' with message 'Invalid
auth/bad request (got a 401, expected HTTP/1.1 20X or a redirect)' in
/home/wedapp/public_html/Dropbox/OAuth/PHP.php:73 Stack trace: #0
/home/wedapp/public_html/Dropbox/OAuth/PHP.php(73):
OAuth->fetch('https://api.dro...', Array, 'POST', Array) #1
/home/wedapp/public_html/Dropbox/API.php(97):
Dropbox_OAuth_PHP->fetch('https://api.dro...', Array, 'POST') #2
/home/wedapp/public_html/index.php(13):
Dropbox_API->getToken('info#isimpledes...', 'webdesigner1982') #3
{main} thrown in /home/wedapp/public_html/Dropbox/OAuth/PHP.php on
line 73
you can see the errors i am getting here. http://wedapp.users34.interdns.co.uk/
Any thing please guys.

A 401 error means "Bad or expired token. This can happen if the user or Dropbox revoked or expired an access token. To fix, you should re-authenticate the user." ( https://www.dropbox.com/developers/reference/api )
You will need to go through the app authentication process again to get a valid token.

Related

Token Refreshed =>Exception in thread "main" com.google.api.client.auth.oauth2.TokenResponseException: 401 Unauthorized

I was able to create an API and a Auth Token for Installed Apps (or desktops) but now, after refreshing the token, I got this everytime:
Exception in thread "main"
com.google.api.client.auth.oauth2.TokenResponseException: 401
Unauthorized POST https://oauth2.googleapis.com/token at
com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:103)
at
com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:308)
at
com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:324)
at
com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:547)
at
com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:470)
at
com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:201)
at
com.google.api.client.http.HttpRequest.execute(HttpRequest.java:880)
at
com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:514)
at
com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:455)
at
com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:565)
Tried everything, deleting and creating a new token, deleting the app and creating everything from start... honestly, I don't know what to do...
Please Help!
Best Regards!

AWS-Amplify: The security token included in the request is invalid

Getting the error "The security token included in the request is invalid" using aws-amplify in the following scenarios
Fully Authenticated app tested it for 30 min, kept idle for another 30 min, got the error.
Questions is: If the token expired, lib should be in a position to request the new token or throw a message to authenticate again.

com.auth0.IdentityVerificationException: An error occurred while exchanging the Authorization Code for Auth0 Tokens

I am trying to implement auth0 in a very basic spring-boot-application based on maven. This is the error that I get:
com.auth0.IdentityVerificationException: An error occurred while exchanging the Authorization Code for Auth0 Tokens
When running the original tutorial-project everything works fine. The error occurs only in my custom application. Basically I copied all the files from the tutorial-project into my application. Nevertheless I run into this error...
further down the exception I see a
com.auth0.exception.APIException: Request failed with status code 401: Unauthorized
Solved it:
The client-secret was wrong. Actually there is a space at the end of my client-secret, which I accidentally removed. Wow.

Tried logging to auth0 i got invalid state error

I have a problem with auth0.
There are two auth0 Applications in the project that I am working on right now. One is in PHP other one is WordPress. Both use auth0 Hosted Page.
First I opened my WordPress site in a tab in my web browser. Then I opened the same in another tab. Then tried logging in from the first tab by entering the email and the password and got the below error message:
wordpress error msg "There was a problem with your log in:
Invalid state [error code: unknown]"
If it is a PHP site got the below error message:
php error msg "Fatal error: Uncaught
Auth0\SDK\Exception\CoreException: Invalid state in
C:\xampp\htdocs\uat.sso\sso\vendor\auth0\auth0-php\src\Auth0.php:511
Stack trace: #0
C:\xampp\htdocs\uat.sso\sso\vendor\auth0\auth0-php\src\Auth0.php(434):
Auth0\SDK\Auth0->exchange() #1
C:\xampp\htdocs\uat.sso\sso\callback.php(8):
Auth0\SDK\Auth0->getUser() #2 {main} thrown in
C:\xampp\htdocs\uat.sso\sso\vendor\auth0\auth0-php\src\Auth0.php on
line 511"
Auth0 have a comprehensive guide on dealing with Invalid State errors in WordPress. You can check it out here.
Basically the most common causes are:
Cached Auth0 Callback URL, some hosting provider do this by default and they should be contacted to not cache this.
Cached Cookies and URL parameters
Cookie name requirements for certain hosting providers like Pantheon.
See the complete list here.

"Sorry, an error occurred while processing this request" instagram api python-instagram

I'm using python-instagram library to get access to instagram api. But when I run my app (flask rest api application), my auth method which use InstagramAPI and get_authorize_login_url method raise 500 error:
raise OAuth2AuthExchangeError("The server returned a non-200 response for URL %s %s %s" % (url, response['status'], content))
OAuth2AuthExchangeError: The server returned a non-200 response for URL https://api.instagram.com/oauth/authorize?scope=basic&redirect_uri=http%3A%2F%2Fsocialservice.test.5-soft.com%3A8515%2Finstagram%2Fauth&response_type=code&client_id=c5095d88cee14bac91a9341e6e82ff8f 500 Sorry, an error occurred while processing this request.
In my local machine it works without any problems but in the production server with different IP I've got this problem.
I would be very appreciative if someone can help to solve me this problem
Thanks in advance,
Ron
Please clarify:
In my local machine it works without any problems but in the production server with different IP I've got this problem.
How can you be performing authorization on your local machine? Instagram's API requires a public url for redirect_uri.
Next, I haven't found any evidence to verify this, but I don't believe you can specify a custom port in your callback url (you've provided http://socialservice.test.5-soft.com:8515/instagram/auth).
Last, assuming it's your callback server that is the problem, that error usually occurs when you aren't returning the correct response back to Instagram. The server needs to echo out only the value of the GET parameter code as plaintext.
If I browse to here: http://socialservice.test.5-soft.com:8515/instagram/auth?code=test I get no response, which is likely the cause of your error.