I think the exclamation marks in your oauth URLs should not be there.
oAuth in google script for bitbucket API rest
-
05-07-2023 - |
質問
i have a problem with my google script to request to Bitbucket API with oAuth
Here is my code :
var consumerKey = '***';
var consumerSecret = '***';
var request_token_url = 'https://bitbucket.org/!api/1.0/oauth/request_token';
var acces_token_url = 'https://bitbucket.org/!api/1.0/oauth/access_token';
var authorize_url = 'https://bitbucket.org/!api/1.0/oauth/authenticate';
var oauthConfig = UrlFetchApp.addOAuthService('bitbucket');
oauthConfig.setConsumerKey(consumerKey);
oauthConfig.setConsumerSecret(consumerSecret);
oauthConfig.setAccessTokenUrl(acces_token_url);
oauthConfig.setRequestTokenUrl(request_token_url);
oauthConfig.setAuthorizationUrl(authorize_url);
var options = {
'oAuthServiceName' : 'bitbucket',
'oAuthUseToken' : 'always'
};
var url = 'https://bitbucket.org/api/1.0/repositories/MYURL';
The error is : error - oAuth error
Thanks
解決
所属していません StackOverflow