Found this content helpful? Log in or sign up to leave a like!

Beta API returns 403 Error

Jump to solution
IkeQuigley
Community Member

I believe there might have been a breaking change with the most recent update. I now only receive 403 Errors when trying to send API calls to our Canvas Beta server.

Notes:

1. I have generated a new API key and updated the system with this new key and client id, and receive the same 403 error.

2. I do not receive the error when running the same request using our same codebase on our test or prod instance of Canvas.

3. No updates have been made on our part that would cause a 403 error.

4. When using a browser to directly access the API (namely [BETA URL]/api/v1/users/[USER ID] I receive the appropriate response without issue.

Any ideas?

Labels (1)
0 Likes
2 Solutions
AdarshKumar03
Community Member

Try adding the user-agent header in the api call.  I was also facing the same issue. After adding this header, it worked for me.

View solution in original post

0 Likes
chriscas
Community Coach
Community Coach

Please see the  Enforcing User-Agent Header for Canvas API Request... - Instructure Community - 658205  blog for more information about this change where API calls will require a user-agent.  It is currently in beta and scheduled to be put in production in January 2026.

-Chris

View solution in original post