Hi,

The 403 error you are receiving almost sounds like the *user account* 
doesn't have enough permissions.  Are you sure that the user account you 
are using via SWORD v2 has the permissions to submit to one (or more) 
Collection within DSpace? 

If that's not helpful, then I'd recommend checking the log files to see if 
you can find more information about the 403 error in the DSpace logs.

I'd also add, there were some recent bug tickets created related to SWORDv2 
on DSpace 7.  These are still being investigated, but the person who 
created them said they have fixes they are looking to share.  The tickets 
might be related to what you are seeing.

https://github.com/DSpace/DSpace/issues/10735
https://github.com/DSpace/DSpace/issues/10736

Tim

On Thursday, May 8, 2025 at 2:44:46 PM UTC-5 [email protected] wrote:

> Hi,
>
> I am working on setting up SWORD 2 on DSpace 7. I followed each step in 
> DSpace 7 documentation (
> https://wiki.lyrasis.org/display/DSDOC7x/SWORDv2+Server).
>
> After that, I tried to test SWORD v2. But it does not work. Can someone 
> help me out? 
> 1)       On the web browser, I was able to log in (at DSpace 7, I belong 
> to the admin group).  https://#######.edu/server/swordv2/servicedocument
>
> However, after log in, it displays as below: 
> HTTP Status 403 – Forbidden
> Type Status Report
> Description The server understood the request but refuses to authorize it.
>
> 2)       In the command line, I typed as below
> curl -i --data-binary "@/home/joshkim/example.zip" -H 
> "Content-Disposition:filename=example.zip" -H 
> "Content-Type:application/zip" -H "X-Packa                                 
>                                        ging:
> http://purl.org/net/sword-types/METSDSpaceSIP"; -u [email protected]:my 
> password https://#####l.edu/server/swordv2/collection/19716/28798
>
> Then, it produces this error as below:
> HTTP/1.1 403 403
> Date: Thu, 08 May 2025 18:26:46 GMT
> Server: Apache/2.4.62 (Red Hat Enterprise Linux) OpenSSL/3.2.2
> Content-Language: en
> Vary: Origin,Access-Control-Request-Method,Access-Control-Request-Headers
> Content-Type: application/json;charset=UTF-8
> Transfer-Encoding: chunked
> {"timestamp":"2025-05 
> 08T18:26:46.245+00:00","status":403,"error":"Forbidden","message":"No 
> message available","path":"/server/swordv2/collection/19716/28798"}
>
>  3)       In a PHP SWORD V2 client, I ran one PHP file. But it says as 
> below:
> About to request servicedocument from https://#####
> l.edu/server/swordv2/servicedocument
>
> Received HTTP status code: 403 (Unknown error (status code 403))
> About to create new item at https://####
> el.edu/server/swordv2/collection/19716/12883
>
> PHP Fatal error:  Uncaught Exception: Error parsing error document (String 
> could not be parsed as XML) in 
> /home/joshkim/sword/swordappv2-php-library-main/swordappclient.php:669
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/dspace-tech/c66999d3-25d7-4668-9e03-61dad4dcb177n%40googlegroups.com.

Reply via email to