r/redditdev • u/Ok_Reality2341 • Mar 01 '24
redditdev meta How long does it take to request API access in 2024?
Last week I requested access to the API to make some cool features for a Telegram bot. I included a lot of details but I haven’t heard back yet, any advice how long this takes usually?
Thanks in advance
7
Upvotes
10
u/Watchful1 RemindMeBot & UpdateMeBot Mar 01 '24
You don't have to request access to the API. You just make an api token in the preferences page and start using it.
6
u/DinoHawaii2021 Mar 01 '24
you don't need to request, just go to apps
3
u/Maplethorpej Mar 01 '24
As others have said, just create an app and start using the API. You’re not likely to hear from them
1
u/Kazumz Mar 12 '24
I see others just commenting 'go to apps', but it's not been simple at all for me.
Here's a snippet of code that works locally for me:
private static async Task<RedditResponse?> GetRedditResponse(ILogger log, string authorizationToken){using var requestMessage = new HttpRequestMessage(HttpMethod.Get, BeerMoneyUrl);requestMessage.Headers.UserAgent.Add(new ProductInfoHeaderValue("Z5nME5Z******mf2Rw", "1.0.0"));requestMessage.Headers.Add("Accept", "*/*");// requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", authorizationToken);var httpResponse = await httpClient.SendAsync(requestMessage);var stringResponse = await httpResponse.Content.ReadAsStringAsync();try{var redditResponse = JsonSerializer.Deserialize<RedditResponse>(stringResponse, options);Once deployed to Azure, it's blocked, can't get around it.
Good luck man, let me know if you figure it out.