I'm using Node and trying to do a simple API call to the call log. My code came from the docs, but modified a bit. Login works just fine so my credentials are ok.
const fetch = require('node-fetch'); const SDK = require('@ringcentral/sdk').SDK; RINGCENTRAL_CLIENTID = '<SECRET>'; RINGCENTRAL_CLIENTSECRET = '<SECRET>'; RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com'; RINGCENTRAL_USERNAME = '<SECRET>'; RINGCENTRAL_PASSWORD = '<SECRET>'; RINGCENTRAL_EXTENSION = '101'; var rcsdk = new SDK({ server: RINGCENTRAL_SERVER, clientId: RINGCENTRAL_CLIENTID, clientSecret: RINGCENTRAL_CLIENTSECRET }); const platform = rcsdk.platform(); exports.handler = async function(event, context) { await rcLogin(); let callLog = await rcCallLog(); console.log(log); return { statusCode: 200, body: JSON.stringify(log) } } async function rcLogin() { return platform.login({ username: RINGCENTRAL_USERNAME, password: RINGCENTRAL_PASSWORD, extension: RINGCENTRAL_EXTENSION }); } async function rcCallLog() { return platform.get('/account/~/extension/~/call-log', { view: 'Detailed' }) }
Specifically the error is: errorMessage: '404 Not Found'