Node.js
How to use access_token?
I'm making a request:
axios.post('https://api.smartsheet.com/2.0/token')...
response:
{
access_token: 'lkqgob9uf56d3vn0a358g4u199',
token_type: 'bearer',
refresh_token: 'd633gl7mlsw9cc7dnwlgmbwepe',
expires_in: 604799
}
What to do next with this information? And how to use it correctly?
I'm creating a client. But when trying to use it, is it always the same result? I think the token is not correct or I'm using it somehow wrong.
var smartsheet = client.createClient({
accessToken: 'lkqgob9uf56d3vn0a358g4u199',
logLevel: 'info',
});
But the result is always the same:
statusCode: 403,
errorCode: 1004,
message: 'You are not authorized to perform this action.',
refId: 'cdx056'
Why is that? Why is the access Token incorrect?
You are not authorized to perform this action.
All I've realized now is that this token doesn't have enough access rights to make requests. All I managed to do was get data about myself using the smartsheet_client code
.Users.get_current_user()
How do I get more rights? How exactly should this be prescribed and where?