Invalid scope on sandbox login

Hello.
Just started out with this whole API login with ouath 2 and having an issue with the sandbox.
When I try to get the access token, I get this:
?error=invalid_scope
and in the page
The page isn’t redirecting properly
I tried different scopes, but none of them worked.
https://api-sandbox.company-information.service.gov.uk
https://identity-sandbox.company-information.service.gov.uk
https://test-data-sandbox.company-information.service.gov.uk
https://test-data-sandbox.company-information.service.gov.uk/test-data/company

What am I doing wrong?

2 Likes

I’m also getting this error on the sandbox environment? any progress here?

1 Like

I am also getting this error, besides several others.

When I am trying a Oauth2 authorisation workflow (with any scope) I am being redirected at a page like https://identity-sandbox.company-information.service.gov.uk/oauth2/company/signin?request=xxxxxxxxxx which returns a HTTP 500 (Internal Server Error)

I’ve tried various scopes, redirect_uri and state parameter during the last 5 days. I’m always getting a HTTP 500 (Internal Server Error).

Additionally, the link https://identity-sandbox.company-information.service.gov.uk/user/manage-authorisations returns a 404 (Page not found)

Any help is appreciated.

The scope values for Sandbox and Production are same. Please omit the word ‘sandbox’ in the scope value.

I did not use scopes that are sandbox-specific, to be more precise I am testing with the following 2 scopes:

where onbviously ‘company_number’ is a dynamically replaced with a real company number.

… and am still getting a HTTP 500.

Even with the wrong scopes I would expect a HTTP 400 Bad Request or a HTTP 403 Forbidden …