最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

catalystbyzoho - Getting OAUTH_SCOPE_MISMATCH error when testing Stratus from my Catalyst Function - Stack Overflow

programmeradmin2浏览0评论

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

Error in getting bucket details: {statusCode: 401, code: 'OAUTH_SCOPE_MISMATCH', message: 'invalid oauth scope to access this URL'}

Share Improve this question asked Jan 21 at 11:20 Vasanth KumarVasanth Kumar 1225 bronze badges 1
  • Sounds like you failed to grant the permission(s) required by the endpoint in question beforehand ...? – C3roe Commented Jan 21 at 11:26
Add a comment  | 

1 Answer 1

Reset to default 1

The 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

发布评论

评论列表(0)

  1. 暂无评论