How to find client secret

  • 1
  • Question
  • Updated 10 months ago
Hey everyone,

I am new to ShareFile and I am trying to locate the client secret.

Can I obtain it via PostMan? If so, then please give me a step by step or point me to some documentation

Is there a function that I can use with the client id, password, etc...

Thanks in advance
Photo of Tarik Abdel-Monem

Tarik Abdel-Monem

  • 13 Posts
  • 1 Reply Like

Posted 10 months ago

  • 1
Photo of Eliezer Encarnacion

Eliezer Encarnacion, Official Rep

  • 731 Posts
  • 102 Reply Likes
Tarik,

1. Go to api.sharefile.com
2. Click on "Get an API Key". It will prompt you to login if you haven't
3. All the Client Ids and Secrets associated with your account will be visible.

Let me know if you run into any issues,

Thanks!
Eli
Photo of Tarik Abdel-Monem

Tarik Abdel-Monem

  • 13 Posts
  • 1 Reply Like
Thanks for responding Eli, I keep receiving an error  when I try to generate an API key

An unexpected error occured while creating your key. If this error persists, contact api@sharefile.com

When I go to https://application.sharefile.com/app/#/settings/admin/overview - I can see an ID, but I take it that this has nothing to do with the client id
Photo of Eliezer Encarnacion

Eliezer Encarnacion, Official Rep

  • 731 Posts
  • 102 Reply Likes
I can look into your error. Do note that you will not see any Client Ids in the main sharefile application, only at api.sharefile.com.
What name are you giving your application in the form? It may be failing if the name includes the word "ShareFile" which is something we're working to correct or provide better feedback about. If that's not the case, I can investigate further

Eli
Photo of Tarik Abdel-Monem

Tarik Abdel-Monem

  • 13 Posts
  • 1 Reply Like
Thanks Eli, that was it, I was placing the word ShareFile in the name of the application.

Excellent, I will probably be posting a few more questions, now that I can get started :-)
Photo of Eliezer Encarnacion

Eliezer Encarnacion, Official Rep

  • 731 Posts
  • 102 Reply Likes
Thanks! Sorry for the bad experience, we're working to address this :)
Photo of Tarik Abdel-Monem

Tarik Abdel-Monem

  • 13 Posts
  • 1 Reply Like
Can I use the same client id/secret to upload a file to another company's space - myfinancialresources.sharefile.com
Photo of Eliezer Encarnacion

Eliezer Encarnacion, Official Rep

  • 731 Posts
  • 102 Reply Likes
Absolutely, each Client Id/Secret pairs works for all accounts, as long as you use the right subdomain in the API calls and provide the correct user credentials.

Eli
Photo of Tarik Abdel-Monem

Tarik Abdel-Monem

  • 13 Posts
  • 1 Reply Like
Excellent, the way that I am reading the php, is this the order that I use to upload a file

authenticate->get_authorization_header->get_hostname->upload_file

If so, then how do I get it to read the file without using $post["File1"]

Do I use fopen? Like $fp = fopen($tempFileName, 'w'); then set  = new CurlFile($local_path);
Photo of Eliezer Encarnacion

Eliezer Encarnacion, Official Rep

  • 731 Posts
  • 102 Reply Likes
I am not familiar enough with Php to help with the implementation, but is there a reason you cannot use $post["file"]? All you need to do is post the file using multi-part upload, whichever way you prefer to implement that in your favorite language. 
Photo of Tarik Abdel-Monem

Tarik Abdel-Monem

  • 13 Posts
  • 1 Reply Like
If there was a form, then I would use $post["file"], but I am trying to build an automated process, that retrieves data from the db, creates a csv file, then uploads to sharefile

Is there an support email address that I can send my code to or should I create another post?