1

I have to pass scope in oauth2 flow in Canvas LMS but I don't know what are the possible values to pass. I didn't see a complete list anywhere. This is the URL but I don't what to pass in scope. Any help?

http:///login/oauth2/auth?client_id=10000001&response_type=code&redirect_uri=https://my-test-url//home/oauth2response&state=30330943-16da-4371-865f-5512b6ec671f&&scope=value_1 value_2 value_n

Simant
  • 3,142
  • 4
  • 32
  • 61

1 Answers1

1

The scope you can use depends on the endpoint you are using, as stated in the documentation:

[...] Canvas API scopes may be found beneath their corresponding endpoints in the "resources" documentation pages. [...]

As an example, for creating an assignment, the scopes which are defined are:

  • url:POST|/api/v1/courses/:course_id/assignments

Depending on the developer keys you are using, it might be possible that you don't need a scope parameter during the authentication process.

Progman
  • 16,827
  • 6
  • 33
  • 48
  • 1
    Thank you for the answer. I am receiving invalid_scope in the error in the OAuth 2.0 flow when I do not pass any scope. I am using folloiwng APIs and how to pass them as scope. /api/v1/courses/{courseId} /api/v1/courses/{courseId}/folders/root /api/v1/folders/{folderId}/files /api/v1/folders/{folderId}/folders – Simant Mar 22 '20 at 15:40
  • @Simant - I tried mentioning the scope in the following format and it works for me, maybe you can try the same - The example format of appending scope to the URI is "scope=url:GET|/api/v1/courses/:course_id/folders" – PreciseSpeech Sep 13 '22 at 06:09