p2 / OAuth2

OAuth2 framework for macOS and iOS, written in Swift.
Other
1.14k stars 277 forks source link

Instragram redirect URL issue error_message "Invalid scope: []" #387

Open tapasTeks opened 2 years ago

tapasTeks commented 2 years ago

I am assuming that the problem with '#' in redirect url so

encode does encode hash so I have used encodeURIComponent("#")

now '#' become '%23' and url looking like this

https://www.instagram.com/oauth/authorize?client_id=\&redirect_uri=https://dev.eventify.io/%23/dashboard/content/social&scope=user_profile,user_media&response_type=code&state=0&eventid=XXX1141927827XXX

BUT I AM GETTING THIS-->

error_type "OAuthException"

code 400

error_message "Invalid scope: []"

I am trying to get token from redirect URL and fetch media of logged user