Android URL中的Kotlin FileNotFoundException

Android URL中的Kotlin FileNotFoundException,android,kotlin,Android,Kotlin,ı想要发出Get请求,这是最简单的方法(我尝试了作为HttpUrlConnection它会给出相同的错误) 但此代码给出如下错误: val sendlink=URL( "$graphlink?grant_type=ig_exchange_token&client_secret=$Clientid&access_token=$shortlived") return sendlink.readText() 这种库为请求代码401或更高版本提

ı想要发出Get请求,这是最简单的方法(我尝试了
作为HttpUrlConnection
它会给出相同的错误) 但此代码给出如下错误:

 val sendlink=URL(
            "$graphlink?grant_type=ig_exchange_token&client_secret=$Clientid&access_token=$shortlived")
        return sendlink.readText()

这种库为请求代码401或更高版本提供FileNotFoundException错误。

您只需剪切最重要的部分:错误消息。ı更新它,但其链接非常重要:)
 java.io.FileNotFoundException: https://graph.instagram.com/access_token?grant_type=ig_exchange_token&client_secret={mysecret}&access_token={Token}