Bungie-net / api

Resources for the Bungie.net API
Other
1.22k stars 92 forks source link

GroupV2.EditGroup is ms-documented #868

Open ghost opened 5 years ago

ghost commented 5 years ago

GroupV2.EditGroup is documented as as requiring the scope oauth2: EditUserData.

However, making a request with the following data

{
    uri : "https://www.bungie.net/Platform/GroupV2/Create/",
    post-data :  {
        "name":"The Meadorians",
       "about":"We Guide Raids",
        "motto":"Be kind",
        "tags":"",
        "isDefaultPostAllicance":false,
        "isDefaultPostPublic":false,
        "callsign":"S117",
        "locale":"en",
        "avatarImageIndex":null,
        "isPublic":null,
        "isPublicTopicAdminOnly":null,
        "allowChat":null,
        "enableInvitationMessagingForAdmins":null,
        "membershipOption":null,
        "chatSecuritySetting":null,
        "groupHomepage":null,
        "platformMembershipType":null,
        "groupType":null
    } 
    headers : {
        "X-API-KEY":REDACTED,
        "User-Agent":"node-bungie-lib/0.0.9 AppId/REDACTED(+REDACTED;REDACTED)",
        "Content-Type":"application/json","Content-Length":417,"Authorization":"REDACTED"} 
    }
}

Renders the following error

{ ErrorCode: 2108,
  ThrottleSeconds: 0,
  ErrorStatus: 'AccessNotPermittedByApplicationScope',
  Message: 'Access not permitted by application scope',
  MessageData: { RequiredScope: 'BnetWrite' } }
Tetron-bng commented 5 years ago

Creating a new group is a more global operation and requires BnetWrite.

https://bungie-net.github.io/multi/operation_post_GroupV2-CreateGroup.html#operation_post_GroupV2-CreateGroup

vthornheart-bng commented 5 years ago

Indeed! For now, I'm going to go ahead and pull out any API calls that require scopes you can't request.

vthornheart-bng commented 5 years ago

TFS 765563