The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
Since creating a new Access Token for the integration, I'm able to upload sis csv import files with the API. However, I am not able to use any of the other API calls (i.e. create logins, list canvas terms, etc...). Seeing how I am an Admin, I am not sure why this is happening. The error is "Invalid access token" when attempting to use calls other than sis csv import calls.
Previous Access Token worked fine. It expired so I created the new one.
Here is an example of using curl with a list terms call and a file upload call:
W20190643:Canvas crierk$ curl -H "Authorization: Bearer <Access Token>" 'https://wou.instructure.com/api/v1/accounts/1/terms'
{"errors":[{"message":"Invalid access token."}]}W20190643:Canvas crierk$
W20190643:Canvas crierk$ curl -F attachment=@/Users/crierk/Canvas/Terms_20230106-150242.csv -H "Authorization: Bearer <Access Token>" 'https://wou.instructure.com/api/v1/accounts/self/sis_imports.json?import_type=instructure_csv'
{"id":327587,"created_at":"2023-01-07T07:50:54Z","started_at":null,"ended_at":null,"updated_at":"2023-01-07T07:50:55Z","progress":0,"workflow_state":"created","data":{"import_type":"instructure_csv"},"batch_mode":null,"batch_mode_term_id":null,"multi_term_batch_mode":null,"override_sis_stickiness":null,"add_sis_stickiness":null,"update_sis_id_if_login_claimed":false,"clear_sis_stickiness":null,"diffing_data_set_identifier":null,"diffing_remaster":null,"diffed_against_import_id":null,"diffing_drop_status":null,"skip_deletes":false,"change_threshold":null,"diff_row_count_threshold":null,"user":{"id":532,"name":"Kolis Crier","created_at":"2020-06-09T10:13:43-07:00","sortable_name":"Crier, Kolis","short_name":"Kolis Crier","sis_user_id":"V00326970","integration_id"H "Authorization: Bearer <Access Token>" 'https://wou.instructure.com/api/v1/accounts/self/terms?search_term=202202'
Solved! Go to Solution.
Hi @chriscas
Thanks for chiming in.
I spent some time with Canvas support and didn't appreciate the deflecting tactics. For instance, telling me that the "purpose" field of the access token is what determines what the token can be used for.
I wound up creating yet another token. That token works consistently.
I suspect that the token I create may have been corrupted behind the scenes since it only "Kind of" worked. Or... Canvas support fixed the issues without saying an issue existed and thus the subsequent token worked. Who knows.
I am good to go now.
Thanks again.
-Kolis
Hi @crierk,
This is a really tough one... I'd say to triple check the token you're using to make sure it's the same (no extra spaces or anything anywhere).
I know you said that all you changed is the token since your old one expired, but in one of your call examples you're using accounts/self and the other you're using accounts/1. I wonder if perhaps your account isn't actually 1?
I've only seen that error when the token was actually invalid (either pasted incorrectly or expired), so my gut really says there is a token problem.
-Chris
Hi @chriscas
Thanks for chiming in.
I spent some time with Canvas support and didn't appreciate the deflecting tactics. For instance, telling me that the "purpose" field of the access token is what determines what the token can be used for.
I wound up creating yet another token. That token works consistently.
I suspect that the token I create may have been corrupted behind the scenes since it only "Kind of" worked. Or... Canvas support fixed the issues without saying an issue existed and thus the subsequent token worked. Who knows.
I am good to go now.
Thanks again.
-Kolis
I am running into the same issue. I tried deleting and recreating the token several times, but it ends up getting expired even though the Expires: was left empty (in other words "never" expire).
I am also the admin of the account and generate tokens by using "+ New Access Token" under "Approved Integration" of the https://our.server.edu/profile/settings page, there are some old tokens used by LTI integrations, and they don't have any issues. Something strange about after calling SIS import API the token is somehow gets marked for expiration.
We are not using the cloud version, but the self-hosted version checked out from GitHub - instructure/canvas-lms at prod
Please help
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in