Hello,
I’m building a personal app and trying to set up authentication although can’t seem to get past the first stage. Here are the steps I have done:
- Built an OAuth client in Monzo for Developers
- Set it to Confidential
I have the client_id
and client_secret
although can’t seem to get to the point where I authenticate in my app. I’m using Python and have a url which looks like this:
https://auth.monzo.com/?client_id={client_id}&redirect_uri={redirect_uri}&response_type=code&state={random_string}
I have tried:
- Pasting this into a browser and then trying to get it to email me a link. It gives me a network error after putting in my email address
- Pinging this with a get request which gives me a
200
although then nothing happens
If I don’t have a web page to redirect this too, what should I use for the redirect URI? I currently have https://developers.monzo.com
as the redirect_uri
What do I do with this URL?
I feel like I’m missing something really basic here. Cheers!
EDIT: Figured this one out. Had to:
- Create the url as outlined in the Redirect to Monzo section (redirect URI has to be a legit web url. I used
https://developers.monzo.com
) - Redirect URL has to be percent encoded i.e. URL safe (mine wasn’t which is why it was failing, I believe)
- Open that in a web page
- This should then give you the option to authenticate via email and the app
- If successful, you’ll get redirected to your web page where the URL in the address box contains your code
You can then exchange your code for a bearer token.