Hello, I am trying to make an api call using Oauth authentication, but i am not be able to find proper endpoints for oauth authorization & get access token.
would you please help me, that i can be able to make an api call using oauth authorization
Because OAuth 1.0 requires a number of requests that are time sensitive, instead of trying to use Postman, I’d recommend trying to understand what is happening by digging into the example Glitch project here: Glitch :・゚✧
Yes, I tried to understand this project https://glitch.com/edit/#!/trello-oauth . but wasn’t able to find the exact way to solve my problem,
because the headers OR query params and methods of the API’s wasn’t mentioned over there.
would you please help me with this ?
I am stuck at a similar place. I need information on what are the headers or query parameters needed for OAuth 1.0 endpoints. Did you manage to find the relevan information?
I want to be clear here because it is easy to get confused: there are two separate ways to get a token to access the API.
The first way is using OAuth 1.0. The Glitch Project uses OAuth 1.0. Our OAuth 1.0 implementation follows the OAuth 1.0 Specification. If you are not familiar with OAuth 1.0 and are not already using it for other applications, I wouldn’t recommend it as a starting point. I would recommend the option below.
The second way is using the 1/authorize/ route. By sending a user to this route with your API key, you are able to ask them to grant your application (identified by the API key) access to their account. For instance, here is the authorization grant using my API key: Authorize | Trello.
If you hit accept, you’ll be given a token which can be passed along with the API key in query parameters to the Trello API. Because your Trello user granted access my API access, you are accessing Trello’s API as that user. So if you take the key and token and add them to the following request:
I use (glitch.com) example with node.js for my backend application but it’s not working for me. It do not return token and token secret after calling this method in login function. Also it shows ERROR: { statusCode: 400, data: 'Invalid Signature' }
const requestURL = "https://trello.com/1/OAuthGetRequestToken";
const accessURL = "https://trello.com/1/OAuthGetAccessToken";
const authorizeURL = "https://trello.com/1/OAuthAuthorizeToken";
const appName = "Trello OAuth Example";
const scope = 'read';
const expiration = '1hour';
// this mehtod called inside login function
oauth.getOAuthRequestToken(function(error, token, tokenSecret, results){
oauth_secrets[token] = tokenSecret;
console.log(token, tokenSecret); // it returns undefined undefined in console
if (error) console.error('ERROR:' , error)
response.redirect(`${authorizeURL}?oauth_token=${token}&name=${appName}&scope=${scope}&expiration=${expiration}`);
});
I tried this /1/auhorize route and it works fine after user grant API access, but it shows token in webpage. I want to use token in node.js backend to make another API calls. How I can retrieve token in backend only and store in DB for future usage?
The Glitch project (Glitch :・゚✧) is not working. The documentation (is it outdated?) keeps pointing to the solution with OAuth1. What’s the problem? What’s the change?
I got into similar problem my junior developer try to integrate the API with Oauth upper version and it cause very damage into the project. How do i undo the changes that is already done? I try to remove the Oauth but its not working.