Comments (5)
I've retitled this to be an "action item" which we can do and close. Just so that we have a clearer idea of what it means to close this.
I think the appropriate fix is for the tutorial doc to explicitly call out the requested_scopes
parameter. An example flow specifically for Groups would probably be a good choice, as I expect it will be a common case.
We've had some improvements to the tutorial in the backlog for ages. Maybe it's finally time that we get to some of them...
from globus-sdk-python.
I gave my app the scope
urn:globus:auth:scope:groups.api.globus.org:all
Do you mean that you passed this scope string for requested_scopes
when starting the oauth flow, or that you set it in the web interface when creating your client?
As far as I know, the setting in the web UI is a legacy feature and doesn't do anything in the normal case. (We should remove it from the SDK tutorial.)
You should be able to pass that scope in when starting the flow. See docs on oauth2_start_flow parameters.
Also, as of SDK v3.0 you shouldn't need to hardcode the scope string. You can get it from globus_sdk.scopes
under the name GroupsScopes
or as GroupsClient.scopes
(see doc on the scopes and scope builders). e.g.
from globus_sdk import GroupsClient
auth_client = ... # create an auth client for your app, varies by app type
auth_client.oauth2_start_flow(requested_scopes=[GroupsClient.scopes.all])
# follow the flow and get a token response, again this varies a little by app type
...
token_response = ...
# either using the scope
tokens = token_response.by_scopes[GroupsClient.scopes.all]
# or using the resource server
tokens = token_response.by_resource_server[GroupsClient.scopes.resource_server]
I generally would prefer the by_resource_server
usage because that attribute is just a dictionary and you can easily inspect it. by_scopes
is a fancy getter which crawls that same dictionary.
from globus-sdk-python.
thanks @sirosen
it works great now, please add this to the docs!
from globus-sdk-python.
@sirosen I wrote a small tutorial and shared my scripts in case it comes useful for your docs: https://zonca.dev/2021/09/globus-groups-python-sdk.html
from globus-sdk-python.
I just noticed that this was still open. It should have been closed back in #511, when I did a pass over the tutorial to do some updates.
from globus-sdk-python.
Related Issues (20)
- RTFD integration didn't fire on v1.8.0 release HOT 1
- Cannot make request to BaseClient base_url without appending a trailing slash HOT 5
- Feature: Add LazyIdentityMap, based on globus-cli's LazyIdentityMap
- Make a user searchable by globus username/email after AuthClient login HOT 2
- Add delete_destination_extra to TransferData documentation
- Feature request: multiple src files transferred to a single dest folder HOT 2
- Support installation with pyinstaller
- automate sharing? HOT 6
- TransferClient.endpoint_manager_task_list has invalid usage as an example
- Raise the lower bound on `cryptography` in the requirements data
- Note the behavior of tokenstorage adapters on Windows; recommend localappdata
- Paginated methods lose typing information for type-checking HOT 2
- TransferAPIError: Error communicating with Globus Nexus Service HOT 1
- Local endpoint / upload without Globus Personal Connect HOT 3
- Use AuthClient.get_identities() to search by email address? HOT 2
- 403, 'ConsentRequired', 'Missing required data_access consent' HOT 2
- Confusing __str__() implementation for OAuthTokenResponse HOT 1
- Create a LoginManager object which provides a model for managing authentication HOT 1
- Missing f-string in parameterized url HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from globus-sdk-python.