admin管理员组文章数量:1318141
I got the early access for Stratus feature for my account and I have installed the Beta SDK in my catalyst Node Advanced I/O function and initialized the Stratus Beta SDK using the below code snippet as mentioned in the official help documentation here
const bucketInstance = await stratusInstance.bucket("mybucket");
const bucketDetails = await bucketInstance.getDetails();
But when I try to run the function in my local machine using the Catalyst CLI command catalyst serve, I am getting the below error
Error in getting bucket details: {statusCode: 401, code: 'OAUTH_SCOPE_MISMATCH', message: 'invalid oauth scope to access this URL'}
I got the early access for Stratus feature for my account and I have installed the Beta SDK in my catalyst Node Advanced I/O function and initialized the Stratus Beta SDK using the below code snippet as mentioned in the official help documentation here
const bucketInstance = await stratusInstance.bucket("mybucket");
const bucketDetails = await bucketInstance.getDetails();
But when I try to run the function in my local machine using the Catalyst CLI command catalyst serve, I am getting the below error
Share Improve this question asked Jan 21 at 11:20 Vasanth KumarVasanth Kumar 1225 bronze badges 1Error in getting bucket details: {statusCode: 401, code: 'OAUTH_SCOPE_MISMATCH', message: 'invalid oauth scope to access this URL'}
- Sounds like you failed to grant the permission(s) required by the endpoint in question beforehand ...? – C3roe Commented Jan 21 at 11:26
1 Answer
Reset to default 1The error OAUTH_SCOPE_MISMATCH indicates that the access token used for accessing Stratus from your function SDK doesn't have correct scopes related to Catalyst Stratus. Since you are testing the function in your local environment using Catalyst CLI, you would have received the necessary scopes during login which didn't include Stratus related scopes.
To resolve this issue, you can try relogging into your Catalyst CLI after updating your CLI using the below command
npm install -g zcatalyst-cli@beta
Once you have updated the CLI, you can relogin to your catalyst account using the below command where you should see the Stratus related scopes in the login URL.
catalyst login --force
Once logged in, you should be able to test your function successfully
本文标签:
版权声明:本文标题:catalystbyzoho - Getting OAUTH_SCOPE_MISMATCH error when testing Stratus from my Catalyst Function - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742046285a2417804.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论