How to persist an OAuth2 token (or use a refresh token) in Postman collections?

Ok, first enter your OAUTH token URL, click on the Body tab, and fill out these POST parameters: client_id, grant_type, username, password, override. Then, click on the Test tab, enter this text and then press Send: var data = JSON.parse(responseBody); postman.setGlobalVariable(“access_token”, data.access_token); postman.setGlobalVariable(“refresh_token”, data.refresh_token); Then enter one of your application URLs, click on the Headers … Read more

How do I connect to the Google Calendar API without the oAuth authentication?

If I’m not wrong, they’ve launched Service Account for this now: https://developers.google.com/accounts/docs/OAuth2ServiceAccount Edit: Here’s the modification from their Prediction API session_start(); require_once “google-api-php-client/src/Google_Client.php”; require_once “google-api-php-client/src/contrib/Google_CalendarService.php”; const CLIENT_ID = ‘…’; const SERVICE_ACCOUNT_NAME = ‘…’; // Make sure you keep your key.p12 file in a secure location, and isn’t // readable by others. const KEY_FILE = ‘…’; … Read more

What’s the point of a timestamp in OAuth if a Nonce can only be used one time?

The timestamp is used for allowing the server to optimize their storage of nonces. Basically, consider the read nonce to be the combination of the timestamp and random string. But by having a separate timestamp component, the server can implement a time-based restriction using a short window (say, 15 minutes) and limit the amount of … Read more

“An access token is required to request this resource” while accessing an album / photo with Facebook php sdk

There are 3 things you need. You need to oAuth with the owner of those photos. (with the ‘user_photos’ extended permission) You need the access token (which you get returned in the URL box after the oAuth is done.) When those are complete you can then access the photos like so https://graph.facebook.com/me?access_token=ACCESS_TOKEN You can find … Read more

Difference between OAuth 2.0 Two legged and Three legged implementation

First, the legs refer to the roles involved. A typical OAuth flow involves three parties: the end-user (or resource owner), the client (the third-party application), and the server (or authorization server). So a 3-legged flow involves all three. The term 2-legged is used to describe an OAuth-authenticated request without the end-user involved. Basically, it is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)