# Accessing SOLID pod from a mobile application

**URL:** <https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394>\
**Category:** General Discussion\
**Created:** [November 15, 2019, 6:07pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394 "2019-11-15T18:07:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leoudayan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/leoudayan/32/763_2.png) [@Leoudayan](https://forum.solidproject.org/u/Leoudayan)\
**Post date:** [November 15, 2019, 6:07pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/1 "2019-11-15T18:07:46Z")

</div>

Hi,

I am thinking of making an android mobile app for SOLID which lets the users to upload files from the smart phone to the SOLID pod. But not sure about the login process using solid auth client. Is there anyone developed/developing mobile apps using SOLID? It will be great if i could find a simple login demo app.

---

<div class="post-metadata">

**Author:** ![Smag0](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/smag0/32/310_2.png) [@Smag0](https://forum.solidproject.org/u/Smag0)\
**Post date:** [November 15, 2019, 6:20pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/2 "2019-11-15T18:20:07Z")

</div>

Hi @Leoudayan can’t you use webapp? Do you really need a native app?

---

<div class="post-metadata">

**Author:** ![Leoudayan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/leoudayan/32/763_2.png) [@Leoudayan](https://forum.solidproject.org/u/Leoudayan)\
**Post date:** [November 15, 2019, 6:26pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/3 "2019-11-15T18:26:29Z")

</div>

I have different ideas in my mind which actually require a native app. Thats why.

---

<div class="post-metadata">

**Author:** ![A\_A](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/a_a/32/786_2.png) [@A\_A](https://forum.solidproject.org/u/A_A)\
**Post date:** [November 17, 2019, 11:36pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/4 "2019-11-17T23:36:15Z")

</div>

Have you tried using solid-auth-client within something like [Cordova](https://cordova.apache.org/)? You can write apps in html, css and js **and** have access to native device APIs. I didn’t try it, but I could imagine it to work.

---

<div class="post-metadata">

**Author:** ![Leoudayan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/leoudayan/32/763_2.png) [@Leoudayan](https://forum.solidproject.org/u/Leoudayan)\
**Post date:** [November 18, 2019, 11:18pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/5 "2019-11-18T23:18:21Z")

</div>

> [@A\_A](#):
>
> Cordova

Thank you for this. I will give it a try and let you know.

---

<div class="post-metadata">

**Author:** ![moisesj](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/moisesj/32/928_2.png) [@moisesj](https://forum.solidproject.org/u/moisesj)\
**Post date:** [November 21, 2019, 3:21am UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/6 "2019-11-21T03:21:32Z")

</div>

Hi @Leoudayan, I’ve been trying really hard to integrate Solid with a .net application server side and it’s next to impossible. First of all, I had to use the solid-auth-client. The good thing is that it is 100% compatible with Open ID Connect and it does produce an authorization token. The bad part is that the node.js solid server will completely ignore my authorization token and rely on cookie based authorization and thus I always get a 403 - unauthorized error. I sifted through the node.js code and found out the hardway.

I decided to read/write to a public container within my POD and now I’m finding out that my Sparql queries are not working as expected. I haven’t even tried updating but I suspect they won’t work either.

If you do the JavaScript/React way, it does work pretty good but for the rest of us that are trying the traditional way we’re out of luck. The inrupt folks have stated that their focus is on the web client side.

I think if they want a greater adoption from the developer community they should at least give us the resources for us to close that gap.

My 2 cents.

---

<div class="post-metadata">

**Author:** ![happybeing](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/happybeing/32/59_2.png) [@happybeing](https://forum.solidproject.org/u/happybeing)\
**Post date:** [November 21, 2019, 9:37am UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/7 "2019-11-21T09:37:04Z")

</div>

I guess for now you could create a server based app but still use the REST API to talk to Solid pods?

My understanding is that it’s a feature to keep the server side standard and put business logic in the client, so this may be best anyway. The idea being that this makes it easier to separate data from apps, to keep the server interface standard and interoperable etc.

---

<div class="post-metadata">

**Author:** ![moisesj](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/moisesj/32/928_2.png) [@moisesj](https://forum.solidproject.org/u/moisesj)\
**Post date:** [November 21, 2019, 3:49pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/8 "2019-11-21T15:49:50Z")

</div>

My only issue with this approach is if the app supports various client types, eg. iOS, Android, React, it would make more sense to abstract the business logic on the server rather than re-writing them for each client.  
In the good spirit of LDP, the data format must be RDF.

---

<div class="post-metadata">

**Author:** ![Smag0](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/smag0/32/310_2.png) [@Smag0](https://forum.solidproject.org/u/Smag0)\
**Post date:** [November 21, 2019, 4:30pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/9 "2019-11-21T16:30:37Z")

</div>

Give a try to [Solidash](https://scenaristeur.github.io/solidash/index.html)  
When logged, your friends name/friends must appear in ’ Name : Public with TRIPLEDOC’ like that

 ![Screenshot_2019-11-21%20Solidash(1)](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/1/1d06bc2317316d3c5dea6f10de5111686c49c2be.png)

 ![Screenshot_2019-11-21%20Solidash](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/b/b5f5ae0e1fdde13812cb8685a739c728c882d5b4.png)

it’s a responsive webApp that should fit Android / iOS or Computer viewport.  
Doesn’t it be what you want ?

---

<div class="post-metadata">

**Author:** ![Leoudayan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/leoudayan/32/763_2.png) [@Leoudayan](https://forum.solidproject.org/u/Leoudayan)\
**Post date:** [November 22, 2019, 11:52am UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/10 "2019-11-22T11:52:41Z")

</div>

Hi @moisesj, Thank you for sharing your experience. Can you explain a bit more about “Javascript/React way” ? My first goal is to create a simple app which logs me into a solid POD and read contents from private folder. I want to do it as a Native app. For now i am exploring whether it is possible to do this using REST API. But based on what you saying, it is not possible to do the login part from the app? In this case, can i just write data to my public folder? If this doesnt work, I am thinking of setting up an express app and send the data to it first before the express app puts it in the POD (i think this might be possible as its a web app). But it will be really cool if i could talk to the POD directly from my phone.

---

<div class="post-metadata">

**Author:** ![Leoudayan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/leoudayan/32/763_2.png) [@Leoudayan](https://forum.solidproject.org/u/Leoudayan)\
**Post date:** [November 22, 2019, 11:54am UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/11 "2019-11-22T11:54:20Z")

</div>

@happybeing this might be a basic question but is it possible to use the REST API from android mobile phone to talk to solid pods as android supports REST?

---

<div class="post-metadata">

**Author:** ![Leoudayan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/leoudayan/32/763_2.png) [@Leoudayan](https://forum.solidproject.org/u/Leoudayan)\
**Post date:** [November 22, 2019, 11:56am UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/12 "2019-11-22T11:56:20Z")

</div>

@Smag0 Thanks for your reply. But, you cannot make your apps to talk to your POD in this way.

---

<div class="post-metadata">

**Author:** ![Smag0](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/smag0/32/310_2.png) [@Smag0](https://forum.solidproject.org/u/Smag0)\
**Post date:** [November 22, 2019, 12:12pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/13 "2019-11-22T12:12:52Z")

</div>

you can add note to your POD ??? isn’t it enough ? if not, what do you mean by “talk to your POD” ?

---

<div class="post-metadata">

**Author:** ![Leoudayan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/leoudayan/32/763_2.png) [@Leoudayan](https://forum.solidproject.org/u/Leoudayan)\
**Post date:** [November 22, 2019, 12:23pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/14 "2019-11-22T12:23:34Z")

</div>

@Smag0 i can add note manually. But how to make an app to write note in the POD? Is that possible? Lets say, i have a notes app in my phone in which if i enter something, it have to sync with the notes file in the POD. Thats the kind of thing i am trying.

---

<div class="post-metadata">

**Author:** ![Smag0](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/smag0/32/310_2.png) [@Smag0](https://forum.solidproject.org/u/Smag0)\
**Post date:** [November 22, 2019, 12:31pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/15 "2019-11-22T12:31:45Z")

</div>

Sharing notes from your “native note app” to a web app could be possible [https://chodounsky.net/2019/03/24/progressive-web-application-as-a-share-option-in-android/](https://chodounsky.net/2019/03/24/progressive-web-application-as-a-share-option-in-android/)  
and reverse too  
sharing from web app to ‘native app’ [https://developers.google.com/web/updates/2016/09/navigator-share](https://developers.google.com/web/updates/2016/09/navigator-share)

---

<div class="post-metadata">

**Author:** ![happybeing](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/happybeing/32/59_2.png) [@happybeing](https://forum.solidproject.org/u/happybeing)\
**Post date:** [November 22, 2019, 12:55pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/16 "2019-11-22T12:55:15Z")

</div>

> [@Leoudayan](#):
>
> this might be a basic question but is it possible to use the REST API from android mobile phone to talk to solid pods as android supports REST?

I haven’t done any Android development but if your native app can do HTTP requests I think the answer has to be yes.

---

<div class="post-metadata">

**Author:** ![Leoudayan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/leoudayan/32/763_2.png) [@Leoudayan](https://forum.solidproject.org/u/Leoudayan)\
**Post date:** [November 22, 2019, 12:56pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/17 "2019-11-22T12:56:18Z")

</div>

Thanks for the links. Will try it.

---

<div class="post-metadata">

**Author:** ![Leoudayan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/leoudayan/32/763_2.png) [@Leoudayan](https://forum.solidproject.org/u/Leoudayan)\
**Post date:** [November 22, 2019, 12:56pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/18 "2019-11-22T12:56:34Z")

</div>

@happybeing Great! will give it a try.

---

<div class="post-metadata">

**Author:** ![A\_A](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/a_a/32/786_2.png) [@A\_A](https://forum.solidproject.org/u/A_A)\
**Post date:** [November 22, 2019, 4:52pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/19 "2019-11-22T16:52:58Z")

</div>

It should be possible. I guess the trickiest part about it will be the authentication (ie something similar as solid-auth-client). After making sure that you are correctly logged in, the rest should be normal HTTP requests (with an authentication header).

---

<div class="post-metadata">

**Author:** ![Leoudayan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/leoudayan/32/763_2.png) [@Leoudayan](https://forum.solidproject.org/u/Leoudayan)\
**Post date:** [November 22, 2019, 5:25pm UTC](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394/20 "2019-11-22T17:25:02Z")

</div>

@A_A EXACTLY!! I was about to post it in here. When i send a POST request, i got 401 unauthenticated error. It returned an HTML page. At this point i am not sure how to handle the login part (display webpage and get signed ID token). I read the authentication part in solid spec (see below). This is the part i am struggling with now. @moisesj is this something you been through already?

> The overall sign in workflow used by the WebID-OIDC protocol is as follows. For example, here is what happens when Alice tries to request the resource `https://bob.example/resource1` .
> 
> 1. [Initial Request](https://github.com/solid/webid-oidc-spec/blob/master/example-workflow.md#1-initial-request): Alice (unauthenticated) makes a request to `bob.example` , receives an HTTP `401 Unauthorized` response, and is presented with a ‘Sign In With…’ screen.
> 2. [Provider Selection](https://github.com/solid/webid-oidc-spec/blob/master/example-workflow.md#21-provider-selection): She selects her WebID service provider by clicking on a logo, typing in a URI (for example, `alice.solidtest.space` ), or entering her email.
> 3. [Local Authentication](https://github.com/solid/webid-oidc-spec/blob/master/example-workflow.md#3-local-authentication-to-provider): Alice gets redirected towards her service provider’s own Sign In page, thus requesting `https://alice.solidtest.space/signin` , and authenticates using her preferred method (password, WebID-TLS certificate, FIDO 2 / [WebAuthn](https://w3c.github.io/webauthn/) device, etc).
> 4. [User Consent](https://github.com/solid/webid-oidc-spec/blob/master/example-workflow.md#4-user-consent): (Optional) She’d also be presented with a user consent screen, along the lines of “Do you wish to sign in to `bob.example` ?”.
> 5. [Authentication Response](https://github.com/solid/webid-oidc-spec/blob/master/example-workflow.md#5-authentication-response): She then gets redirected back towards `https://bob.example/resource1` (the resource she was originally trying to request). The server, `bob.example` , also receives a signed ID Token from `alice.solidtest.space` that was returned with the response in point 3, attesting that she has signed in.
> 6. [Deriving a WebID URI](https://github.com/solid/webid-oidc-spec/#deriving-webid-uri-from-id-token): `bob.example` (the server controlling the resource) validates the ID Token, and extracts Alice’s WebID URI from inside it. She is now signed in to `bob.example` as user `https://alice.solidtest.space/#i` .
> 7. [WebID Provider Confirmation](https://github.com/solid/webid-oidc-spec/#webid-provider-confirmation): `bob.example` confirms that `solidtest.space` is indeed Alice’s authorized OIDC provider (by matching the provider URI from the `iss` claim with Alice’s WebID).

[Next page](https://forum.solidproject.org/t/accessing-solid-pod-from-a-mobile-application/2394.md?page=2)
