I am integrating fitbit in iOS app, my issue is - after login with fitbit account.
I am getting code and with that code getting refresh token and access token by using http request, But when I refresh that refresh-token value by http request I am getting error.
Error is as below.
"Refresh token invalid or expired:"
If any anyone have any idea regarding this issue then kindly help me out.
Thanks
Related
I develop an app that should run on server, when the app is loading its being automatically signing in and works fine.
however after an hour when the token is expired i can't use the app again,
it works via http get, and so i get a error response token expired.
I need to add to the Get function condition that checked if token is expired if so to request for refresh token,
however when im trying to do so i get the error
AADSTS9002313: Invalid request. Request is malformed or invalid
i tried to reproduce it via postman and the same error occur, can you guys please tell me what i am doing wrong?
post https://login.microsoftonline.com/common/oauth2/v2.0/token
client_id : value
client_secret: value
grant_type : refresh_token
refresh_token: the current access token i saved when app was initiated
*i also have resource but when i add it i get an error that it is not supported so i deleted it.
thanks.
I was able to resolve it by checking manually the expired flag and if expired to create new connection to the request.
I am developing an API. I implemented register, login, and Facebook auth using Auth0.
My token expires after one day, and I need to get my refresh token to sign in the user again without requiring its credentials again. I have to make a call to /authorize with these parametrs [sic]:
GET https://YOUR_AUTH0_DOMAIN/authorize?
audience=API_IDENTIFIER&
scope=SCOPE&
response_type=code&
client_id=YOUR_CLIENT_ID&
redirect_uri=https://YOUR_APP/callback&
state=STATE
but I get this error Image
The GET response should give me a code, which I would use to get my refresh token making another GET request on /oauth/token like that: Image
Does anyone have any idea how to get over the first step?
Have you tried using curl to get access token and refresh token and then refresh outside of your app? The following link has very detailed instruction on how to do that with auth0.
https://auth0.com/learn/refresh-tokens/
SO when I try to get a refresh Token from Mautic I am getting an auth code but then from there I am not able to get an access/refresh token. When I try to get it I just receive a 403 error message with invalid code as the description. Not sure what is going on!
Thanks
Cam
I've been using Oauth Plugin for LinkedIn authentication with salesforce for a few months now without any issues; today we are seeing this error with no change to our existing code. I verified that the API keys and the scope were correct on the LinkedIn Developer site. Anyone know how to solve this issue?
ERROR:
Failed getting a request token. HTTP Code = 403. Message: Forbidden.
Response Body:
oauth_problem=Scope%20NOT_AUTHORIZED%20%3A%20r_fullprofile%2C%20Scope%20NOT_AUTHORIZED%20%3A%20r_network%2C%20Scope%20NOT_AUTHORIZED%20%3A%20rw_groups%2C%20Scope%20NOT_AUTHORIZED%20%3A%20rw_nus%2C%20Scope%20NOT_AUTHORIZED%20%3A%20w_messages
Endpoint=https://api.linkedin.com/uas/oauth/requestToken?scope=r_fullprofile%20r_emailaddress%20r_network%20r_contactinfo%20rw_nus%20rw_groups%20w_messages, Method=GET]
They have made some changes to the LinkedIn API. Have a look at Developer Program Transition Guide
I use this script:
https://developers.google.com/youtube/v3/code_samples/php#resumable_uploads
to upload videos to youtube. Everything works fine, but next day I have error:
An client error occurred: The OAuth 2.0 access token has expired, and a refresh token is not available. Refresh tokens are not returned for responses that were auto-approved.
I looked at some tips on how to fix this but I did not succeed. I am new to programming. Please help me fix this error.
You need to set the access type to offline which allows you to refresh the access token so you can authenticate the app without the user having to give authorization again.
Check the docs.
I can't test this now, but try the following. This isn't ideal though, you should be persisting the token somewhere.
// After "$client->setRedirectUri($redirect);" add:
$client->setAccessType('offline');
// After "$client->setAccessToken($_SESSION['token']);" add:
if ($client->isAccessTokenExpired()) {
$currentTokenData = json_decode($_SESSION['token']);
if (isset($currentTokenData->refresh_token)) {
$client->refreshToken($currentTokenData->refresh_token);
}
}