# Uplink: Invalid access grant format shown

**URL:** <https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304>\
**Category:** troubleshooting\
**Tags:** uplink\
**Created:** [August 5, 2022, 1:52pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304 "2022-08-05T13:52:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrBodean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mrbodean/32/1139_2.png) [@MrBodean](https://forum.storj.io/u/MrBodean)\
**Post date:** [August 5, 2022, 1:52pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/1 "2022-08-05T13:52:16Z")

</div>

Ok, just started installing uplink on server. THe install went fine but when I try to do this  
uplink access import main accessgrant.txt  
I get this error  
uplink: invalid access grant format

But I copied the txt file that was downloaded by creating access in first place.  
Has something changed?

---

<div class="post-metadata">

**Author:** ![heunland](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/heunland/32/6076_2.png) [@heunland](https://forum.storj.io/u/heunland)\
**Post date:** [August 5, 2022, 2:42pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/2 "2022-08-05T14:42:30Z")

</div>

Welcome to the forum! Please follow these [instructions](https://docs.storj.io/dcs/getting-started/quickstart-uplink-cli/uploading-your-first-object/set-up-uplink-cli/#set-up-uplink-cli-with-access-grant) where it is mentioned that you need to specify the path to the saved access grant in the `uplink access` command (`~/Downloads/accessgrant.txt` _for example_ ).

---

<div class="post-metadata">

**Author:** ![MrBodean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mrbodean/32/1139_2.png) [@MrBodean](https://forum.storj.io/u/MrBodean)\
**Post date:** [August 5, 2022, 2:49pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/3 "2022-08-05T14:49:42Z")

</div>

I am in the root folder on linux so shouldn’t this work?  
uplink access import main accessgrant.txt  
I am cd to that folder  
I have tried other but just says cant find file, this was does not say that but has error

---

<div class="post-metadata">

**Author:** ![heunland](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/heunland/32/6076_2.png) [@heunland](https://forum.storj.io/u/heunland)\
**Post date:** [August 5, 2022, 4:59pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/4 "2022-08-05T16:59:15Z")

</div>

Have you tried to include the full path? It would probably also be a good idea to move the accessgrant.txt file to a subdirectory first.

---

<div class="post-metadata">

**Author:** ![MrBodean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mrbodean/32/1139_2.png) [@MrBodean](https://forum.storj.io/u/MrBodean)\
**Post date:** [August 5, 2022, 5:34pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/5 "2022-08-05T17:34:43Z")

</div>

its in the root, would accessgrant.txt not be in root? I copied it to usr folder then tried this  
uplink access import main usr/accessgrant.txt

I no little on linux, maybe root folder should be something else? …/ or /, not sure

---

<div class="post-metadata">

**Author:** ![heunland](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/heunland/32/6076_2.png) [@heunland](https://forum.storj.io/u/heunland)\
**Post date:** [August 5, 2022, 6:06pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/6 "2022-08-05T18:06:12Z")

</div>

If accessgrant.txt is now in the usr folder, then I think the following should work:

```auto
uplink access import main /usr/accessgrant.txt

```

---

<div class="post-metadata">

**Author:** ![MrBodean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mrbodean/32/1139_2.png) [@MrBodean](https://forum.storj.io/u/MrBodean)\
**Post date:** [August 5, 2022, 7:25pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/7 "2022-08-05T19:25:18Z")

</div>

Tried that, still no go

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [August 6, 2022, 2:02pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/8 "2022-08-06T14:02:40Z")

</div>

I can confirm, the new access grant saved as a file in the satellite UI cannot be imported to the latest `uplink` without modification - it contains the text `access grant: ` before the access grant.

> <https://github.com/storj/storj/issues/5066>
>
> \<!--
> Please make sure that we do not have any duplicates already open. 
> You ca…n ensure this by searching the issue list for this repository. 
> If there is a duplicate, please close your issue and add a comment to the 
> existing issue instead.
> 
> For more information about reporting issues, see
> https://github.com/storj/storj/blob/main/docs/storagenode/CONTRIBUTING.md
> 
> \---------------------------------------------------
> GENERAL SUPPORT INFORMATION
> \---------------------------------------------------
> 
> The GitHub issue tracker is for bug reports and feature requests.
> General support can be found at the following locations:
> 
> \- Storj Community Forum - https://forum.storj.io
> \- File a ticket at https://support.storj.io/
> 
> \---------------------------------------------------
> BUG REPORT INFORMATION
> \---------------------------------------------------
> \--\>
> 
> \*\*Description\*\*
> 
> \<!--
> Provide a more detailed introduction to the issue itself, and why you consider it to be a bug
> \--\>
> 
> The downloaded access grant file cannot be imported to the \`uplink\`, because the file contains text \`access grant: \` before an access grant.
> 
> \*\*Steps to reproduce the issue:\*\*
> 
> 
> 
> 1. Login to the satellite UI, navigate to \*\*Access\*\* view and create a new access grant
> 2. Click on \*\*Dowload .txt\*\* button, save the file \`access-credentials-2022-08-06T13\_37\_38.495Z.txt\`
> 3. Install uplink
> 4. In the terminal:
> \`\`\`
> uplink access import access-credentials-2022-08-06T13\_37\_38.495Z.txt
> \`\`\`
> 
> You will get an error:
> \`\`\`
> uplink: invalid access grant format
> storj.io/uplink.ParseAccess:98
> main.parseAccessDataOrPossiblyFile:75
> main.(\*cmdAccessImport).Execute:37
> main.(\*external).Wrap:123
> github.com/zeebo/clingy.(\*Environment).dispatchDesc:126
> github.com/zeebo/clingy.(\*Environment).dispatch:53
> github.com/zeebo/clingy.(\*Environment).dispatchDesc:70
> github.com/zeebo/clingy.(\*Environment).dispatch:53
> github.com/zeebo/clingy.Environment.Run:34
> main.main:26
> runtime.main:255
> \`\`\`
> 
> \*\*Describe the results you expected:\*\*
> The downloaded file should be possible to import to \`uplink\`
> 
> \*\*Describe the results you received:\*\*
> The downloaded file cannot be imported to \`uplink\`
> 
> \*\*Possible Fix\*\*
> 
> 
> You can open a downloaded file and remove text before an access grant and save this file.
> 
> \*\*Your environment\*\*
> 
> \- Operating system and version: Windows 10 Pro, Ubuntu 20.04 LTS
> \- Additional environment details (Raspberry PI, Docker, VMWare, etc.): uplink v1.60.3

---

<div class="post-metadata">

**Author:** ![MrBodean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mrbodean/32/1139_2.png) [@MrBodean](https://forum.storj.io/u/MrBodean)\
**Post date:** [August 8, 2022, 12:56pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/9 "2022-08-08T12:56:57Z")

</div>

ok that was the problem. removed the access grant: and it worked. HOWEVER  
next I made a folder called cakes  
and that created fine. Then I upload an image like this  
uplink cp image.jpg sj://cakes  
upload image.jpg to sj://cakes/image.jpg  
13.67 KiB / 13.67 KiB [---------------------------------------------------] 100.00% 19.32 KiB p/s

and as you can see it uploaded fine, or so it looks, but when I go into the folder, there are no files there, so while it created the folder, it did not work when uploading files  
What now?

---

<div class="post-metadata">

**Author:** ![heunland](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/heunland/32/6076_2.png) [@heunland](https://forum.storj.io/u/heunland)\
**Post date:** [August 8, 2022, 5:36pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/10 "2022-08-08T17:36:44Z")

</div>

make sure you use the same encryption passphrase as when you uploaded your file.

---

<div class="post-metadata">

**Author:** ![MrBodean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mrbodean/32/1139_2.png) [@MrBodean](https://forum.storj.io/u/MrBodean)\
**Post date:** [August 8, 2022, 9:48pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/11 "2022-08-08T21:48:27Z")

</div>

OK, got that. What about ports? When I have my firewall up, it fails to copy. What ports do I need open for Uplink?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [August 9, 2022, 6:52am UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/12 "2022-08-09T06:52:30Z")

</div>

Any. Storj uses p2p protocol to transfer pieces, your uplink uploads pieces to nodes directly across the globe, they may have literally any port, so you shouldn’t block any outgoing ports. You do not need to open any Incoming ports.

---

<div class="post-metadata">

**Author:** ![MrBodean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mrbodean/32/1139_2.png) [@MrBodean](https://forum.storj.io/u/MrBodean)\
**Post date:** [August 9, 2022, 12:32pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/13 "2022-08-09T12:32:35Z")

</div>

ok slowly getting there :). Now I got one I just can’t figure out. I am trying to set it up so I can use direct urls, so trying to add CNAME & TXT dns entries, but the example has me confused. this is what I got back and setup

```auto
Remember to update the $ORIGIN with your domain name. You may also change the $TTL.
$ORIGIN example. com.
$TTL 3600
storj.vionline.com IN	CNAME	link.storjshare.io.
txt-storj.vionline.com	IN	TXT storj-root:ivsnft/content
txt-storj.vionline.com	IN	TXT storj-access: ACCESSTOKEN

```

but my cpanel ask for this info  
CNAME  
{  
Record Name:  
Domain"? No name was given but when looking at others like ftp it was vionline. com  
TTL - defaults to 14400  
}

TXT  
{  
Record Name:  
Cache:  
Text record:  
}

TXT  
{  
Record Name:  
Cache:  
Text record:  
}

I had to put a space in vionline. com, your forum would not let me enter links so I just rename, take spaces out  
From my data above can you please insert what info needs to go in these 3?

---

<div class="post-metadata">

**Author:** ![Stob](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/stob/32/1137_2.png) [@Stob](https://forum.storj.io/u/Stob)\
**Post date:** [August 9, 2022, 6:24pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/14 "2022-08-09T18:24:01Z")

</div>

This should be correct:

CNAME  
{  
Record Name:storj  
Host? - [link.storjshare.io](http://link.storjshare.io)  
TTL - defaults to 14400  
}

TXT  
{  
Record Name: txt-storj  
Cache: 14400 is fine but 3600 is returned  
Text record: storj-root:ivsnft/content  
}

TXT  
{  
Record Name: txt-storj  
Cache: 14400 or 3600  
Text record: storj-access:ACCESSTOKEN  
}

---

<div class="post-metadata">

**Author:** ![MrBodean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mrbodean/32/1139_2.png) [@MrBodean](https://forum.storj.io/u/MrBodean)\
**Post date:** [August 10, 2022, 1:17pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/15 "2022-08-10T13:17:53Z")

</div>

> [@Stob](#):
>
> txt-storj

well getting closer 🙂 When I go to the page, it shows the storj page, but it says can’t find bucket

### Oops! Bucket not found.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Stob](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/stob/32/1137_2.png) [@Stob](https://forum.storj.io/u/Stob)\
**Post date:** [August 10, 2022, 1:30pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/16 "2022-08-10T13:30:17Z")

</div>

It’s likely your bucket or accesstoken is incorrect. You can test it by using the _original_ link…

e.g. https:// [link.storjshare.io/s/](http://link.storjshare.io/s/) **ACCESSTOKEN** / **ivsnft/content** /picture.jpg

---

<div class="post-metadata">

**Author:** ![MrBodean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mrbodean/32/1139_2.png) [@MrBodean](https://forum.storj.io/u/MrBodean)\
**Post date:** [August 10, 2022, 1:55pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/17 "2022-08-10T13:55:21Z")

</div>

> [@Stob](#):
>
> https:// [link.storjshare.io/s/](http://link.storjshare.io/s/) **ACCESSTOKEN** / **ivsnft/content** /picture.jpg

for some reason that just reroutes to google search for storj  
What exactly is prefix? My bucket is called ivsnft and inside is a folder called content, is it correct to use prefix that way?

---

<div class="post-metadata">

**Author:** ![Stob](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/stob/32/1137_2.png) [@Stob](https://forum.storj.io/u/Stob)\
**Post date:** [August 10, 2022, 1:59pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/18 "2022-08-10T13:59:56Z")

</div>

So an example is from @jtolio’s website…

`http://link.storjshare.io/raw/jxb3xcosji3cqehkiw7kyfipw5eq/oliosite/jtolio/images/ice.jpg`  
(also just realised you probably want **raw** not **s** )

Access token = jxb3xcosji3cqehkiw7kyfipw5eq  
Bucket/prefix = oliosite/jtolio  
Path to file = images/ice.jpg

---

<div class="post-metadata">

**Author:** ![MrBodean](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mrbodean/32/1139_2.png) [@MrBodean](https://forum.storj.io/u/MrBodean)\
**Post date:** [August 10, 2022, 3:43pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/19 "2022-08-10T15:43:19Z")

</div>

SUCCESS !!! 🙂 I guess it just had to proagate, but its working. Now I dont even know if I should attempt next step, but how do I get it working with https? Is it something I can do on server or do I need and outside service

---

<div class="post-metadata">

**Author:** ![Stob](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/stob/32/1137_2.png) [@Stob](https://forum.storj.io/u/Stob)\
**Post date:** [August 10, 2022, 4:02pm UTC](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304/20 "2022-08-10T16:02:28Z")

</div>

> [@MrBodean](#):
>
> how do I get it working with https?

You’ll need an https proxy service. Cloudflare and Fastly are two such providers.

[Next page](https://forum.storj.io/t/uplink-invalid-access-grant-format-shown/19304.md?page=2)
