Array notation suggests these are supposed to be passed as an array. But in fact scopes should be passed as a string.
URI.encode_www_form transforms that into a repeating scopes parameter, e.g. [...]&scopes=marketplace.billing&scopes=openid[...], which ends up passing incorrect scopes to the API.
Passing a string results in the following scopes format: [...]&scopes=marketplace.billing+openid[...] which is correctly interpreted by the API.
Array notation suggests these are supposed to be passed as an array. But in fact scopes should be passed as a string.
URI.encode_www_form
transforms that into a repeatingscopes
parameter, e.g.[...]&scopes=marketplace.billing&scopes=openid[...]
, which ends up passing incorrect scopes to the API.Passing a string results in the following
scopes
format:[...]&scopes=marketplace.billing+openid[...]
which is correctly interpreted by the API.